@font-face {
  font-family: "Angelic";
  src: url("fonts/Angelic_Serif.woff2") format("woff2");
}

@font-face {
  font-family: "Smalle";
  src: url("fonts/smalle.woff2") format("woff2");
}

body {
  background: #e9e6e1;
  background-image: url("images/works/bg.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  font-family: "Times New Roman", monospace, serif;
  font-size: 14px;
  color: #2e2e2e;
}

.page-title-img {
  display: block;
  width: 115px;
  height: 25px;
  margin: 30px auto 0;
}

/* 3-image grid for work detail pages */
.work-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 440px;
  margin: 10px 0;
}

.work-grid-3 img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center top;
  cursor: pointer;
  transition: transform 0.2s ease;
  box-shadow:
    -2px -2px 0px rgba(255,255,255,0.8),
     2px  2px 0px rgba(0,0,0,0.25),
     4px  4px 8px rgba(0,0,0,0.2);
}

.work-grid-3 img:hover {
  transform: scale(1.04);
}

/* home button */
.home {
  position: fixed;
  top: 30px;
  left: 30px;
  z-index: 10;
}

.home img {
  display: block;
  width: 60px;

  filter: drop-shadow(2px 4px 4px rgba(0,0,0,0.4));
}

.home:hover .home-img {
  content: url("images/about/icon-home-hover.png");

  filter: drop-shadow(0 0 8px rgba(255,255,255,0.8));
}

.container {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
}


/* sidebar column wrapper */
.sidebar-col {
  display: flex;
  flex-direction: column;
  margin-top: 100px;
  overflow: visible;
}

/* decorative image above sidebar */
.sidebar-img-wrap {
  position: relative;
  display: block;
  overflow: visible;
}

.sidebar-img {
  width: 172px;
  height: auto;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.sidebar-img-wrap:hover .sidebar-img {
  opacity: 1;
}

.sidebar-tooltip {
  position: absolute;
  bottom: 100%;
  margin-bottom: 8px;
  left: 50%;
  transform: translateX(-50%);

  background: rgba(255,255,255,0.92);
  color: #2e2e2e;
  font-family: "Didot", monospace, serif;
  font-size: 14px;
  padding: 9px 13px;
  white-space: nowrap;

  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 1px 2px 6px rgba(0,0,0,0.12);

  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* little triangle pointer */
.sidebar-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(255,255,255,0.92);
}

.sidebar-img-wrap:hover .sidebar-tooltip {
  opacity: 1;
}

/* sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 130px;
  width: 120px;

  background: rgba(255, 255, 255, 0.555);
  padding: 14px;
  backdrop-filter: blur(6px);

  overflow-y: scroll;

  border: 12px solid transparent;
  border-image: url("images/borders/border-sidebar.png") 12 stretch;
}

/* rows */
.folder,
.item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* sub */
.sub {
  display: none;
  flex-direction: column;
  margin-left: 16px;
  gap: 4px;
}

/* icons */
.icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  object-fit: contain;
}

/* ✦ hover */
.label {
  transition: 0.15s;
}

.folder:hover .label,
.item:hover .label {
  color: white;
  text-shadow:
    -1px -1px 0 #5c5346,
     1px -1px 0 #5c5346,
    -1px  1px 0 #5c5346,
     1px  1px 0 #5c5346;
}

/* RIGHT PANEL */
.content {
  width: 520px;
  height: 420px;

  padding: 18px;

  background: rgba(255, 255, 255, 0.556);
  backdrop-filter: blur(6px);

  overflow-y: scroll;

  border: 12px solid transparent;
  border-image: url("images/borders/border-sidebar.png") 12 stretch;
}

/* PAGES */
.page {
  display: none;
}

.page.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* back button breaks out of centering */
.page.active .back {
  align-self: flex-start;
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.grid .item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.content .item img {
  width: 90%;
  cursor: pointer;
  display: block;

  /* bevel: light hits top-left, shadow falls bottom-right */
  box-shadow:
    -2px -2px 0px rgba(255,255,255,0.8),
     2px  2px 0px rgba(0,0,0,0.25),
    -4px -4px 6px rgba(255,255,255,0.4),
     4px  4px 8px rgba(0,0,0,0.2);

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.content .item img:hover {
  transform: scale(1.04);

  box-shadow:
    -3px -3px 0px rgba(255,255,255,0.9),
     3px  3px 0px rgba(0,0,0,0.3),
    -5px -5px 8px rgba(255,255,255,0.5),
     6px  6px 12px rgba(0,0,0,0.25);
}

.caption {
  text-decoration: underline;
  cursor: pointer;
  text-align: center;
  margin-top: 5px;
}

.caption,
.content li {
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.15s, background 0.15s;
}

.caption a {
  color: inherit;
  text-decoration: inherit;
  transition: 0.15s;
}

.caption:hover,
.caption a:hover,
.content li:hover {
  color: #ffffff;
  background: #928579;
  padding: 1px 4px;
  margin: -1px -4px;
}

.work-img {
  width: 230px;
  height: auto;
  margin-top: 10px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.work-img:hover {
  transform: scale(1.06);
}

/* bare images inside work detail pages (not in a grid .item) */
.page > img:not(.work-title-img):not(.no-viewer) {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.page > img:not(.work-title-img):not(.no-viewer):hover {
  transform: scale(1.03);
}

/* BACK BUTTON */
.back {
  cursor: pointer;
  margin-bottom: 10px;
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.5px;
  opacity: 0.5;
  transition: opacity 0.15s;
  user-select: none;
}
 
.back:hover {
  opacity: 1;
}

/* SCROLLBAR — Windows 95 / early internet style */
::-webkit-scrollbar {
  width: 16px;
}

::-webkit-scrollbar-track {
  background: #c0c0c0;
  border-left: 1px solid #808080;
}

::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
}

::-webkit-scrollbar-thumb:hover {
  background: #b0b0b0;
}

::-webkit-scrollbar-button {
  background: #c0c0c0;
  height: 16px;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: inset 1px 1px 0 #dfdfdf;
  display: block;
}

::-webkit-scrollbar-button:hover {
  background: #b0b0b0;
}

::-webkit-scrollbar-corner {
  background: #c0c0c0;
}

/* Firefox */
.sidebar,
.content {
  scrollbar-width: auto;
  scrollbar-color: #c0c0c0 #c0c0c0;
}

/* VIEWER */
.viewer {
  position: fixed;
  inset: 0;
  background: rgba(241, 241, 241, 0.467);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
}

.viewer.active {
  display: flex;
}

.viewer img {
  max-width: 80vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

h2 {
  font-family: "Smalle", serif;
  font-size: 28px;
  color: #8d7e68;
  text-shadow: 1px 2px 6px rgba(0, 0, 0, 0.227);
}

.page ul {
  text-align: center;
  list-style: none;
  padding: 0;
}

.page iframe {
  margin-top: 10px;
  margin-bottom: 20px;
  box-shadow:
    -2px -2px 0px rgba(255,255,255,0.8),
     2px  2px 0px rgba(0,0,0,0.25),
     4px  4px 8px rgba(0,0,0,0.2);
}

.page video {
  object-fit: cover;
}

.work-title-img {
  width: 220px;    /* adjust to taste */
  height: auto;
  margin-bottom: 6px;
}

/* 4-image grid inside work detail pages */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 340px;
  margin: 10px 0;
}

.work-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center top;
  cursor: pointer;
  transition: transform 0.2s ease;
  box-shadow:
    -2px -2px 0px rgba(255,255,255,0.8),
     2px  2px 0px rgba(0,0,0,0.25),
     4px  4px 8px rgba(0,0,0,0.2);
}

.work-grid img:hover {
  transform: scale(1.04);
}