@import url("https://fonts.googleapis.com/css2?family=Vollkorn+SC:wght@400;600;700;900&display=swap");
@import url("https://use.typekit.net/wwf2iyo.css");

:root {
  /* CSS HEX */
  --essay-font-size: 1.4rem;
  --kobicha: #60452aff;
  --walnut-brown: #716452ff;
  --tigers-eye: #af6824ff;
  --bronze: #c77d13ff;
  --bronze-2: #c27b14ff;
  --dark-purple: #39212aff;
  --caramel: #ba8658ff;
  --wrapper-width: 50%;
  --wrapper-width-mobile: 65%;
  --body-bg: #f5f5f5;
  --header-font: "bennet-text-four", sans-serif;
  /* font for the main title of the web page*/
  --vollkorn: "Vollkorn";
  --vollkorn-sc: "Vollkorn SC", serif;
  --full-star: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
}

::selection {
  background-color: yellow;
  color: #2c2932;
}

* {
  margin: 0;
}

body {
  font-family: serif;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  height: 100%;
  align-items: center;
  background-color: var(--body-bg);
}

header {
  width: 100%;
  font-family: "bennet-text-four", sans-serif;
  font-weight: 700;
  font-style: normal;
  font-optical-sizing: auto;
  /* font-weight: 400; */
  font-style: normal;
  background-color: oklch(18% 0.06 350); /* Dark, carbon-like ash */
  color: rgb(231, 205, 205);
  padding-top: 4rem;
  display: flex;
  flex-direction: column;
}

h1 {
  font-weight: 700;
  margin-bottom: -0.7rem;
  font-family: var(--vollkorn-sc);
  text-align: center;
  font-size: clamp(4vw, 6vw, 8vw);
  border-top: 10px solid oklch(30% 0.04 20);
  background-color: oklch(30.56% 0.0022 335.43 / 99.41%);
}

.bottom-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  font-size: larger;
  /* gap: 1.5rem; */
}

.bottom-wrapper > p {
  font-family: "bennet-text-four", sans-serif;
}

.bottom-wrapper div:last-child {
  margin-top: 1rem;
}

.writer-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  /* gap:3rem; */
}

.essay-info {
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: left;
}

.header-content.translators {
  font-size: 1.2rem;
}

.circle {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  margin-right: 0.7rem;
  margin-left: 1rem;
  background-color: gray;
  display: inline-block;
  vertical-align: middle;
}

p.header-content {
  color: inherit;
  font-family: var(--vollkorn);
  text-align: left;
}

.header-content .author-name {
  font-family: var(--vollkorn-sc);
}

.reading-time-wrapper {
  order: 99; /* Pushes the last item to the end */
  flex-basis: 100%; /* Ensures it takes up the full width */
  display: flex;
  justify-content: center;
  margin: 0;
  top: 5px;
}

.header-content.reading-time {
  font-size: 1rem;
  letter-spacing: 1px;
  background-color: #9ca099;
  max-width: fit-content;
  border-radius: 10px;
  color: #2c2932;
  padding: 0.1rem 0.3rem;
  margin-bottom: 0.4rem;
}

#grossman {
  background-image: url(https://m.media-amazon.com/images/M/MV5BMWFhNTMyNTUtNzc2ZS00NzJkLWI4YjQtYmJjNWRmNDE5ZDNjL2ltYWdlL2ltYWdlXkEyXkFqcGdeQXVyMTc4MzI2NQ@@._V1_.jpg);
  background-size: 100%;
}

a {
  outline-color: transparent;
  text-decoration: none;
}

a:link {
  color: #6900ff;
}

a:visited {
  color: #a5c300;
}

a:focus {
  text-decoration: none;
  background: #bae498;
}

a:hover {
  text-decoration: none;
  background: #545851;
}

a:active {
  background: #6900ff;
  color: #cdfeaa;
}

a:link.author-name {
  color: #f5f5f5;
}

footer {
  flex-grow: 0;
  flex-shrink: 0;
  padding: 1rem;
  background-color: var(--tigers-eye);
  margin-top: 1rem;
  font-family: var(--header-font);
}

.footer-text,
.copyright-disclaimer-text {
  margin: 0.2rem 4rem;
  color: snow;
}

.footer-text > a {
  color: snow;
}

.copyright {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

:hover.github-logo,
:visited.github-logo {
  background: black;
  box-shadow: 1px 1px var(--caramel), -1px -1px var(--body-bg),
    4px 4px var(--walnut-brown);
}

hr {
  width: var(--wrapper-width);
  /* text-align: center; */
}

#essay-wrapper {
  width: var(--wrapper-width);
  /* margin-left: auto;
    margin-right: auto; */
  padding: 0.5rem 2rem;
  border-radius: 0.5rem;
}

.wikipedia-link {
  color: #36454f;
  text-decoration: none;
  border-bottom: 1px dotted whitesmoke;
}

.first-paragraph::first-letter {
  /* font-size: 4rem; */
  background-color: #000000;
  color: white;
  -webkit-initial-letter: 3;
  initial-letter: 3;
  border-radius: 2px;
  box-shadow: 3px 3px 0 red;
  font-size: 250%;
  padding: 6px 3px;
  margin-right: 0.4rem;
}

p {
  margin-bottom: 1rem;
  color: #2c2932;
  font-size: var(--essay-font-size);
  font-family: "garamond-premier-pro", serif;
  font-weight: 400;
  font-style: normal;
  line-height: 1.85rem;
  text-wrap: pretty;
}

.de pre {
  font-family: sans;
}

.poetry pre {
  font-style: italic;
  font-size: var(--essay-font-size);
}

.translation {
  background-color: #f3ebeb;
  border-radius: 5px;
  /* text-indent: 0.5rem; */
  padding: 0.25rem 0.5rem;
}

a.section-title:visited {
  border: 10px solid red;
  border-radius: 5px;
}

/* Pagination styles */
.visuallyhidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: auto;
  margin: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap;
}

nav {
  box-sizing: border-box;
  border-top: 1px solid #eee;
  margin-bottom: 1.5rem;
  font: 1.2rem sans-serif;
  display: flex;
  justify-content: center;
}

.pagination {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.pagination li {
  /* margin: 0 1px; */
  line-height: 1.5rem;
  padding: 10px;
}

.pagination a {
  display: block;
  padding: 0.2em 0.2em;
  border-radius: 0.2em;
  text-decoration: none;
}

.pagination a[aria-current="page"] {
  font-family: bennet-text-four, sans-serif;
  font-size: 1.5rem;
  color: var(--dark-purple);
  height: fit-content;
}

.pagination a[aria-current="page"]:hover {
  background: none;
  text-shadow: 1px 0px var(--bronze-2);
  box-shadow: 1px 1px 0px red, -1px -1px var(--dark-purple);
}

.full-star {
  background-color: red;
  color: white;
  border: none;
  cursor: pointer;
  clip-path: var(--full-star);
  width: 1rem;
  height: 1rem;
  align-self: center;
  
}

.wrapper-full-star,
.wrapper-half-star {
  display: inline;
  padding: 0;
  text-decoration: none;
  align-self: center;
  display: flex;

}

a.wrapper-full-star:hover,
a.wrapper-half-star:hover {
  background: none;
}

/* Shadow Effect on Hover */
.full-star::before,
.half-star::before {
  content: "";
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: inherit; /* Use the same clip-path */
  background: inherit; /* Match background */
  z-index: -1;
  transition: all 0.3s ease-in-out;
  display: block;
}

/* Apply shadow on hover */
.full-star:hover::before,
.half-star:hover::before {
  background: var(--kobicha);
  transform: scale(1.9);
}

a.wrapper-full-star:hover,
a.wrapper-half-star:hover {
  background: none;
  filter: drop-shadow(0px 0px 1rem rgba(0, 0, 0, 0.5))
    drop-shadow(1px 10px 20px rgba(255, 0, 0, 0.8));
}

.left {
  -webkit-mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 1) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 50%, transparent 50%);
}

.right {
  -webkit-mask-image: linear-gradient(
    to left,
    rgba(0, 0, 0, 1) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 50%, transparent 50%);
}

.symbol-span{
  display: block;
  font-size: 1rem;
  text-align: center;
  color: var(--dark-purple);
}

/* Enables view transitions */
@view-transition {
  navigation: auto;
}

/* transition time  */
::view-transition-group(root) {
  animation-duration: 1s;
}


@media only screen and (max-width: 700px) {
  * {
    margin: 0 0;
    padding: 0 0;
    box-sizing: border-box;
  }

  body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    max-width: 100vw;
  }

  header {
    padding: 0.4rem 0.4rem;
    text-align: center;
    max-width: 100%;
  }

  h1 {
    text-align: center;
    letter-spacing: 1px;
    border-top: none;
    border-radius: 1px;
    font-size: 8vw; /* 90% of viewport width divided by approx. 10 characters */
    white-space: nowrap; /* Prevents text from wrapping */
  }

  #grossman {
    display: none;
  }

  .header-content .author-name {
    font-size: x-large;
  }

  .bottom-wrapper {
    display: flex;
    align-items: center;
  }

  /* .bottom-wrapper div:last-child{
        width: 60%;
    } */

  .essay-info {
    position: relative;
    align-self: flex-start;
  }

  .header-content.reading-time {
    /* position: absolute; */
    font-size: 1.2rem;
    /* letter-spacing: 1px; */
    background-color: #9ca099;
    max-width: fit-content;
    border-radius: 10px;
    color: #2c2932;
    /* padding: 0.1rem 0.15rem; */
    /* text-wrap: nowrap; */
    width: fit-content;
    /* top: 100%;
        left: 25%; */
    /* transform: translate(-50%, -50%); */
  }

  .header-content.translators {
    font-size: smaller;
  }

  #essay-wrapper {
    width: initial;
    /* margin: 0 0.5rem; */
    padding: 0 3vw;
  }

  p {
    font-size: var(--essay-font-size);
    word-wrap: break-word;
    text-wrap: pretty;
  }

  footer {
    width: 100%;
  }

  .footer-text {
    margin: 0.2rem 1rem;
  }
}

/* source:   https://www.joshwcomeau.com/gradient-generator/ */

.gradient {
  background-image: linear-gradient(
    135deg,
    hsl(30deg 39% 27%) 0%,
    hsl(30deg 32% 29%) 12%,
    hsl(31deg 27% 31%) 18%,
    hsl(31deg 23% 33%) 22%,
    hsl(32deg 20% 35%) 26%,
    hsl(34deg 18% 37%) 29%,
    hsl(35deg 16% 38%) 33%,
    hsl(30deg 24% 40%) 36%,
    hsl(28deg 32% 41%) 39%,
    hsl(28deg 40% 41%) 42%,
    hsl(28deg 48% 42%) 44%,
    hsl(28deg 56% 42%) 47%,
    hsl(29deg 66% 41%) 50%,
    hsl(28deg 57% 44%) 53%,
    hsl(28deg 51% 47%) 56%,
    hsl(28deg 46% 49%) 58%,
    hsl(28deg 43% 50%) 61%,
    hsl(28deg 42% 52%) 64%,
    hsl(28deg 42% 54%) 67%,
    hsl(28deg 35% 50%) 71%,
    hsl(27deg 34% 45%) 74%,
    hsl(25deg 33% 40%) 78%,
    hsl(22deg 31% 35%) 82%,
    hsl(15deg 27% 28%) 88%,
    hsl(338deg 27% 18%) 100%
  );
}
