:root {
  --bright: #e9e6d3;
  --sand:   #ffd1ab;
  --olive:  #6e834e;
  --accent: #694f5d;
  --dark:   #374139;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  font-family: Garamond, serif;
  color: var(--olive);

  background: var(--sand);
  box-shadow: inset 0 0 100px 40px #edc0a0;

  cursor: url("res/cur_point.png") 0 0, auto;
}

.root {
  width: 100%;
  height: 100%;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;

  border: 64px solid transparent;
  border-image: url("./res/border_b.png") 32 stretch;

  image-rendering: pixelated;
}

.contents {
  flex: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 0;
}

.main {
  width: 90%;
  height: 90%;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
  font-size: 2rem;

  border: 50px solid transparent;
  border-image: url("./res/border_a.png") 32 stretch;

  image-rendering: pixelated;
}

.link_button {
    display: inline-block;

    padding: 0.55rem 0.95rem;
    border: 2px solid var(--dark);
    border-radius: 0.55rem;

    background: var(--bright);
    color: var(--dark);

    text-decoration: none;
    line-height: 1;
    font-weight: 600;

    cursor: pointer;

    transition:
        border-color 120ms ease,
        background-color 120ms ease,
        box-shadow 120ms ease,
        transform 120ms ease;
}

.link_button:hover {
    border-color: var(--olive);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--dark);
    text-decoration: none;
}

.link_button:active {
    transform: translatey(1px);
}


/*NAVBAR*/
.nav {
  position: relative;
  z-index: 10;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;

  width: fit-content;
  max-width: calc(100% - 2rem);
  margin: 0.75rem auto 0;
  padding: 0.45rem 0.65rem;

  background:
    linear-gradient(
      180deg,
      rgba(233, 230, 211, 0.96) 0%,
      rgba(255, 209, 171, 0.88) 100%
    );

  border: 2px solid var(--dark);
  border-radius: 999px;

  box-shadow:
    0 4px 0 var(--dark),
    0 8px 18px rgba(55, 65, 57, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -2px 0 rgba(105, 79, 93, 0.20);
}

.nav::before,
.nav::after {
  content: "";

  position: absolute;
  top: 50%;

  width: 0.55rem;
  height: 0.55rem;

  background: var(--accent);
  border: 2px solid var(--dark);
  border-radius: 50%;

  transform: translateY(-50%);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 1px 0 rgba(55, 65, 57, 0.4);
}

.nav::before {
  left: 0.65rem;
}

.nav::after {
  right: 0.65rem;
}

.nav-link {
  position: relative;
  z-index: 1;

  display: inline-block;

  padding: 0.42rem 0.9rem;
  border-radius: 999px;

  color: var(--dark);
  text-decoration: none;

  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: lowercase;

  text-shadow: 0 1px 0 rgba(233, 230, 211, 0.8);

  transition:
    background-color 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease,
    transform 120ms ease;
}

.nav-link:hover {
  color: var(--bright);
  background: var(--accent);

  text-decoration: none;
  text-shadow: none;

  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.18),
    inset 0 -2px 0 rgba(55, 65, 57, 0.35),
    0 2px 0 var(--dark);

  transform: translateY(-1px);
}

.nav-link:active {
  transform: translateY(1px);

  box-shadow:
    inset 0 2px 0 rgba(55, 65, 57, 0.35);
}


/*LIBRARY*/
.library-intro {
  max-width: 46rem;
  margin: 0 auto 2rem;

  text-align: center;
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--olive);
}

.library-group {
  margin: 0 0 2rem;
}

.library-group h2 {
  margin: 0 0 0.65rem;

  color: var(--accent);
  font-size: 1.35rem;
  text-transform: lowercase;
  letter-spacing: 0.04em;

  border-bottom: 2px solid rgba(55, 65, 57, 0.25);
  padding-bottom: 0.25rem;
}

.library-links {
  margin: 0;
  padding-left: 1.2rem;
}

.library-links li {
  margin: 0.45rem 0;
  line-height: 1.25;
}

.library-links a {
  color: var(--dark);
  text-decoration: none;
}

.library-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}




.library-shell {
  flex: 1;
  min-height: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 1.5rem;
  box-sizing: border-box;
}

.library-box {
  width: min(56rem, 100%);
  max-height: 100%;
  box-sizing: border-box;

  overflow-y: auto;
  overflow-x: hidden;

  padding: 2rem 2.4rem;

  color: var(--dark);
  background:
    linear-gradient(
      180deg,
      rgba(233, 230, 211, 0.94),
      rgba(255, 209, 171, 0.90)
    );

  border: 3px solid var(--dark);
  border-radius: 1.2rem;

  box-shadow:
    0 6px 0 var(--dark),
    0 18px 35px rgba(55, 65, 57, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -4px 0 rgba(105, 79, 93, 0.18);

  scrollbar-color: var(--accent) rgba(233, 230, 211, 0.7);
  scrollbar-width: thin;
}



/*GALLERY*/
.gallery-list {
  width: min(100%, 42rem);
  max-height: 100%;

  box-sizing: border-box;
  overflow-y: auto;

  margin: 0 auto;
  padding: 1.5rem;
}

.gallery-list h1 {
  margin: 0 0 1rem 0;
  text-align: center;
  font-weight: normal;
}

.book-list {
  list-style: none;

  margin: 0;
  padding: 0;

  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.book-item {
  margin: 0;
  padding: 0;
}

.book-spine {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  min-height: 3rem;
  padding: 0.65rem 1rem 0.65rem 1.35rem;

  box-sizing: border-box;

  color: var(--charcoal-brown);
  text-decoration: none;

  background:
    linear-gradient(
      90deg,
      rgba(55, 65, 57, 0.28) 0,
      rgba(55, 65, 57, 0.12) 0.45rem,
      rgba(255, 209, 171, 0.70) 0.45rem,
      rgba(233, 230, 211, 0.88) 100%
    );

  border: 1px solid rgba(55, 65, 57, 0.38);
  border-radius: 0.25rem 0.7rem 0.7rem 0.25rem;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -0.25rem 0 rgba(55, 65, 57, 0.08),
    0 0.25rem 0.6rem rgba(55, 65, 57, 0.18);
}

.book-spine::before {
  content: "";

  position: absolute;
  left: 0.72rem;
  top: 0.45rem;
  bottom: 0.45rem;

  width: 1px;
  background: rgba(55, 65, 57, 0.30);
}

.book-spine:hover {
  transform: translateX(0.15rem);
}

.book-title {
  font-size: 1.15rem;
  letter-spacing: 0.03em;
}

.book-desc {
  max-width: 45%;

  font-size: 0.85rem;
  opacity: 0.75;

  text-align: right;
}

.gallery-card {
    display: block;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
}

.sketchbook-shell {
  width: 100%;
  height: 100%;

  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 2rem;
}

.sketchbook-box {
  width: min(90vw, 1100px);
  height: min(78vh, 760px);

  box-sizing: border-box;

  display: flex;
  flex-direction: column;

  overflow: hidden;

  padding: 1.25rem;

  background: rgba(233, 230, 211, 0.82);
  border: 2px solid var(--charcoal-brown);
  border-radius: 1.25rem;

  box-shadow:
    inset 0 0 0 0.25rem rgba(255, 209, 171, 0.35),
    0 0.75rem 2rem rgba(55, 65, 57, 0.25);

  scrollbar-color: var(--accent) rgba(233, 230, 211, 0.7);
  scrollbar-width: thin;
}

.sketchbook-head {
  flex: 0 0 auto;

  text-align: center;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;

  border-bottom: 1px solid rgba(55, 65, 57, 0.35);
}

.sketchbook-head h1 {
  margin: 0.25rem 0;
  font-weight: normal;
}

.sketchbook-head p {
  margin: 0;
  opacity: 0.75;
}

.back-link {
  display: inline-block;
  margin-bottom: 0.25rem;

  color: var(--charcoal-brown);
  text-decoration: none;
  opacity: 0.75;
}

.back-link:hover {
  opacity: 1;
}

.sketch-strip {
  flex: 1 1 auto;
  min-height: 0;

  overflow-x: auto;
  overflow-y: hidden;

  display: flex;
  align-items: center;
  gap: 2rem;

  padding: 1rem;

  scroll-snap-type: x mandatory;
}

.sketch-page {
  flex: 0 0 auto;

  height: 100%;
  max-width: 90%;

  margin: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  scroll-snap-align: center;
}

.sketch-page img {
  max-height: 100%;
  max-width: 100%;

  display: block;
  object-fit: contain;

  border-radius: 0.35rem;

  box-shadow:
    0 0.35rem 1rem rgba(55, 65, 57, 0.25);
}