@import url("https://fonts.googleapis.com/css2?family=Azeret+Mono:wght@400;500;700&display=swap");

:root {
  --gap: 12px;

  --line: #111;
  --bg: #f7f7f7;
  --image-bg: #e9e9e9;
  --image-cross: #9a9a9a;

  --font-main: "Azeret Mono", monospace;
  --font-caption: "Satoshi", sans-serif;

  --type-xs: 12px;
  --type-sm: 16px;
  --type-md: 20px;
  --type-lg: 40px;
  --type-xl: 64px;

  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;

  --leading-tight: 0.95;
  --leading-normal: 1.2;
  --tracking-wide: 0.35em;
}

/* link styling */

.internal-link,
.external-link {
  color: #111;
  text-decoration: none; 
  transition: color 120ms ease, background-color 120ms ease-out, box-shadow 120ms ease;
  display: inline-block;
  width: 100%;
  position: relative;
  z-index: 0;

}


.internal-link:hover {
  color: #111;
  background: #e6d23f;
  box-shadow: 0 0 0 6px #e6d23f;
}

.external-link:hover {
  color: #111;
  background: rgb(192, 236, 124);
  box-shadow: 0 0 0 6px rgb(192, 236, 124);
}

.internal-link.active {
  color: #111;
  background: #f0e383;
  box-shadow: 0 0 0 6px #f0e383;
}

.external-link:active {
  color: #f7f7f7;
  background: #111;
  box-shadow: 0 0 0 6px #111;
}

.external-link-inline {
  color: #111;
  background: rgb(192, 236, 124);
  text-decoration: none;
  transition: color 120ms ease, background-color 120ms ease-out;
  width: 100%;
  position: relative;
  z-index: 0;
  padding-left: 2px;
  padding-right: 2px;
}

.external-link-inline:hover {
  color: var(--bg);
  background: #111;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--line);
  font-family: var(--font-main);
  font-size: var(--type-sm);
  font-weight: var(--weight-regular);

  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr 40px;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}

a {
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  * {
    cursor: none !important;
  }

  .site-cursor {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 2000;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.199);
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition:
      width 100ms ease,
      height 100ms ease,
      border-radius 100ms ease,
      background-color 100ms ease,
      border-color 100ms ease,
      clip-path 100ms ease,
      rotate 100ms ease;
  }

  .site-cursor.is-clickable {
    width: 22px;
    height: 22px;
    border: 4px solid rgb(230, 16, 126);
    border-radius: 50%;
    background: rgb(0, 0, 0, 0);
  }
}

/* HEADER */

.site-header {
  display: grid;
  grid-template-columns: 3fr 2fr;
  min-height: 170px;
  max-height: 210px;
  border-bottom: 2px solid var(--line);
}

/* box settings for left side (name, art) */

.header-left{
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100%;

}

.header-left {
  border-right: 2px solid var(--line);
}

/* box settings for right side (nav, links) */

.header-right{
  display: grid;
  grid-template-columns: 3fr 1fr;
  min-height: 100%;
}

.header-cell {
  position: relative;
  padding: var(--gap);
  padding-top: 16px;
  padding-bottom: 18px;
  overflow: hidden;
}

.header-left .header-cell:first-child,
.header-right .header-cell:first-child {
  border-right: 2px solid #111;
}  


/* left header cells */

.header-left .header-cell:first-child {
  width: 100%;
  height: 100%;
  font-size: var(--type-md);
  line-height: 1;
}

.header-art {
  padding: 0;
  overflow: hidden;
}

.header-left .header-art {
  border-right: 0;
}

.header-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.name-box {
  text-align: right;
  font-size: var(--type-lg);
  font-weight: var(--weight-medium);
  line-height: 1;
  
}

#site-name {
  position: absolute;
  right: 16px;
  top: 16px;
  white-space: nowrap;
}

/* right header cells */

.main-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--gap);
  font-size: var(--type-md);
  line-height: 0.75;
}

.external-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--gap);
  font-size: var(--type-md);
  line-height: 0.75;
}

/*  Main Layout */

.site-main {
  position: relative;
  display: grid;
  grid-template-columns: 3fr 2fr;
  height: auto;
  min-height: 0;
}

/* Left Display */

.display-panel {
  display: grid;
  grid-template-rows: 1fr auto auto;
  height: 100%;
  min-height: 0;
  border-right: 2px solid var(--line);
}

.selected-video {
  position: relative;
  z-index: 0;
  min-height: 0;
  border-bottom: 2px solid var(--line);
  background: transparent;
}

.selected-video iframe {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.selected-art,
.selected-video {
  grid-row: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.selected-art {
  position: relative;
  z-index: 0;
  background-color: transparent;
  background-image: var(--work-image, none);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-bottom: 2px solid var(--line);
}

.caption {
  min-height: 120px;
  padding: var(--gap);
  display: grid;
  align-content: start;
  gap: 8px;
}

body.hide-caption .caption {
  display: none;
}

body.hide-caption .display-panel {
  grid-template-rows: 1fr auto;
}

body.hide-caption .selected-art {
  border-bottom: 0;
}

.page-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--gap);
  padding: var(--gap);
  border-bottom: 2px solid var(--line);
}

.page-controls[hidden] {
  display: none;
}

.page-controls button {
  width: fit-content;
}

.page-controls button:last-child {
  justify-self: end;
}

.page-controls button:disabled {
  opacity: 0.35;
  cursor: default;
}

.caption h1,
.caption p {
  margin: 0;
}

.caption h1 {
  font-size: var(--type-md);
  font-weight: var(--weight-regular);
  line-height: var(--leading-tight);
}

.caption p {
  font-family: var(--font-caption);
  font-size: var(--type-sm);
  font-style: italic;
  line-height: var(--leading-normal);
}

/* Right Archive */

.about-panel {
  padding-top: 20px;
  padding-left: 25px;
  padding-right: 25px;
  font-family: var(--font-main);
  font-size: var(--type-md);
}
.archive-panel {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}

.archive-title {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
  padding: var(--gap);
  border-bottom: 2px solid var(--line);
  font-size: var(--type-md);
  line-height: var(--leading-tight);
  min-height: 40px;
  display: flex;
  align-items: flex-start;
}

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--gap) * 2) var(--gap);
  padding: var(--gap);
}

.thumb {
  display: grid;
  grid-template-rows: 1fr 8px;
  gap: 5px;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.thumb-image {
  position: relative;
  z-index: 0;
  display: block;
  min-width: 0;
  min-height: 0;
  background-color: transparent;
  background-image:
    var(--thumb-image, none),
    linear-gradient(to bottom right, transparent calc(50% - 1px), var(--image-cross) calc(50% - 1px), var(--image-cross) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(to top right, transparent calc(50% - 1px), var(--image-cross) calc(50% - 1px), var(--image-cross) calc(50% + 1px), transparent calc(50% + 1px));
  background-color: var(--image-bg);
  background-size: cover, 100% 100%, 100% 100%;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: center, center, center;
  overflow: hidden;
}

.thumb-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.484);
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms ease;
}

.thumb:hover .thumb-image::before {
  opacity: 1;
}

.thumb::after {
  content: "";
  display: block;
  height: 5px;
  background: transparent;
  transition: background-color 190ms ease;
}

.thumb.active::after {
  background: #ff0000;
}

/* ASCII Transition */

.ascii-transition {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;

  color: var(--line);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1;

  white-space: pre;
  overflow: hidden;

  background: transparent;
  opacity: 0;
  transition: opacity 120ms ease;
}

/* FOOTER */

.site-footer {
  display: grid;
  grid-template-columns: 3fr 2fr;
  border-top: 2px solid var(--line);
  height: 40px;
  min-height: 0;
}

.footer-left,
.footer-right {
  padding: var(--gap);
  font-size: var(--type-sm);
  line-height: var(--leading-normal);
}

.footer-left {
  border-right: 2px solid var(--line);
}

.footer-right{
  text-align: right;
}
