:root {
  --gold: #c9a45a;
  --gold-bright: #f3d27a;
  --gold-dark: #6f5525;
  --title: #d7dce4;
  --ivory: #f8f1df;
  --black: #030202;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--black);
}

canvas {
  display: block;
}

#loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: var(--black);
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

#loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-word {
  color: var(--title);
  font-family: muscle-narrow, sans-serif;
  font-style: italic;
  font-size: 56px;
  line-height: 1;
}

.loader-line {
  position: absolute;
  top: calc(50% + 48px);
  width: 140px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--gold),
    transparent
  );
  animation: loaderPulse 1.4s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%, 100% {
    opacity: 0.25;
    transform: scaleX(0.75);
  }

  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

.luxury-ui {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  color: var(--gold);
  font-family: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  /* letter-spacing: 0.18em; */
  text-transform: uppercase;
}

body.page-bio .luxury-ui::before,
body.page-bio .luxury-ui::after,
body.page-rankings .luxury-ui::before,
body.page-rankings .luxury-ui::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  z-index: 1;
  pointer-events: none;
}

body.page-bio .luxury-ui::before {
  top: 0;
  height: 120px;
  background: linear-gradient(
    to bottom,
    var(--black) 33%,
    rgba(3, 2, 2, 0) 100%
  );
}

body.page-bio .luxury-ui::after {
  bottom: 0;
  height: 140px;
  background: linear-gradient(
    to top,
    var(--black) 30%,
    rgba(3, 2, 2, 0.92) 60%,
    rgba(3, 2, 2, 0) 100%
  );
}

body.page-bio .luxury-ui::before,
body.page-rankings .luxury-ui::before {
  top: 0;
  height: 120px;
  background: linear-gradient(
    to bottom,
    var(--black) 33%,
    rgba(3, 2, 2, 0) 100%
  );
}

body.page-bio .luxury-ui::after,
body.page-rankings .luxury-ui::after {
  bottom: 0;
  height: 140px;
  background: linear-gradient(
    to top,
    var(--black) 30%,
    rgba(3, 2, 2, 0.92) 60%,
    rgba(3, 2, 2, 0) 100%
  );
}

.viewport-border {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(201, 164, 90, 0.58);
  box-shadow:
    inset 0 0 0 1px rgba(111, 85, 37, 0.35),
    inset 0 0 24px rgba(201, 164, 90, 0.035),
    0 0 22px rgba(201, 164, 90, 0.06);
}

.viewport-border::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(201, 164, 90, 0.5);
  pointer-events: none;

  background:
    linear-gradient(90deg, transparent, rgba(243, 210, 122, 0.7), transparent) top center / 180px 1px no-repeat,
    linear-gradient(90deg, transparent, rgba(243, 210, 122, 0.7), transparent) bottom center / 180px 1px no-repeat,
    linear-gradient(180deg, transparent, rgba(243, 210, 122, 0.7), transparent) left center / 1px 120px no-repeat,
    linear-gradient(180deg, transparent, rgba(243, 210, 122, 0.7), transparent) right center / 1px 120px no-repeat;
}

.viewport-border::after {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;

  background:
    linear-gradient(90deg, rgba(243,210,122,0.95), transparent 86px) left top / 110px 1px no-repeat,
    linear-gradient(180deg, rgba(243,210,122,0.95), transparent 86px) left top / 1px 110px no-repeat,

    linear-gradient(270deg, rgba(243,210,122,0.95), transparent 86px) right top / 110px 1px no-repeat,
    linear-gradient(180deg, rgba(243,210,122,0.95), transparent 86px) right top / 1px 110px no-repeat,

    linear-gradient(90deg, rgba(243,210,122,0.95), transparent 86px) left bottom / 110px 1px no-repeat,
    linear-gradient(0deg, rgba(243,210,122,0.95), transparent 86px) left bottom / 1px 110px no-repeat,

    linear-gradient(270deg, rgba(243,210,122,0.95), transparent 86px) right bottom / 110px 1px no-repeat,
    linear-gradient(0deg, rgba(243,210,122,0.95), transparent 86px) right bottom / 1px 110px no-repeat;
}

.viewport-border,
.site-title a,
.corner-nav,
.socials {
  z-index: 3;
}

.site-title a {
  position: absolute;
  top: 0px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: var(--title);
font-family: muscle-narrow, sans-serif;
font-weight: 400;
font-style: italic;
text-transform: initial;
  font-weight: 300;
  padding: 0 28px;
 background: 
  var(--black);
pointer-events: all;
  font-size: 45px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
margin-top: -5px;
}

.side-nav {
  position: absolute;
  top: 50%;
  pointer-events: auto;
}

.side-nav a,
.socials a {
  color: var(--gold);
  text-decoration: none;
  font-size: 12px;
  font-weight: 400;
  transition:
    color 0.25s ease,
    text-shadow 0.25s ease,
    letter-spacing 0.25s ease;
}

.side-nav a:hover,
.socials a:hover {
  color: var(--gold-bright);
  /* letter-spacing: 0.24em; */
  text-shadow: 0 0 12px rgba(243, 210, 122, 0.45);
}

.corner-nav {
  position: absolute;
  pointer-events: auto;
}

.corner-nav a {
  color: var(--gold);
  text-decoration: none;

  font-size: 15px;
  font-weight: 400;

  letter-spacing: 0.24em;
}

.corner-nav a:hover {
  color: var(--gold-bright);
  /* letter-spacing: 0.28em; */

  text-shadow:
    0 0 12px rgba(243, 210, 122, 0.35);

  opacity: 1;
}

/* positions */

.corner-top-left {
  top: 20px;
  left: 28px;
}

.corner-top-right {
  top: 20px;
  right: 28px;
}

.corner-bottom-left {
  bottom: 20px;
  left: 28px;
}

.corner-bottom-right {
  bottom: 20px;
  right: 28px;
}

.socials {
  position: absolute;
  left: 50.5%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 24px;
  pointer-events: auto;
}

.socials span {
  display: block;
  width: 28px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(201, 164, 90, 0.8),
    transparent
  );
}

.socials a {
  font-size: 20px;
}

/* responsive tightening */
@media (max-width: 700px) {
  .viewport-border {
    inset: 4px;
  }

  .viewport-border::before {
    inset: 2px
  }

  .site-title {
    top: 28px;
  }

  .side-nav-left {
    left: 4px;
  }

  .side-nav-right {
    right: 4px;
  }

  .socials {
    bottom: 12px;
  }


  .corner-top-left {
  top: 12px;
  left: 18px;
}

.corner-top-right {
  top: 12px;
  right: 18px;
}

.corner-bottom-left {
  bottom: 12px;
  left: 18px;
}

.corner-bottom-right {
  bottom: 12px;
  right: 18px;
}

.corner-nav a {
  font-size: 12px;
}

.socials a {
  font-size: 15px;
}

.site-title a{
  margin-top: -11px;
}

}



body.page-bio {
  overflow-y: auto;
  background:
    radial-gradient(circle at center top, rgba(42, 13, 10, 0.38), transparent 42%),
    var(--black);
  color: var(--ivory);
}

body.page-bio .luxury-ui {
  position: fixed;
}

.bio-page-content {
  position: relative;
  z-index: 1;
  width: min(800px, calc(100% - 80px));
  margin: 0 auto;
  padding: 120px 0 140px;
}

.bio-image {
  display: block;
  width: 100%;
  max-height: 720px;
  object-fit: cover;
  margin: 0 auto 54px;
  border: 1px solid rgba(201, 164, 90, 0.42);
}

.bio-text {
  max-width: 800px;
  margin: 0 auto;
  text-align: justify;
 font-family: "adobe-jenson-pro-display", serif;
font-weight: 400;
font-style: normal;
  font-size: clamp(18px, 1.4vw, 24px);
  line-height: 1.55;
color: var(--title);
}

.bio-text p {
  margin: 0 0 1.35em;
}



body.page-rankings {
  overflow-y: auto;
  background:
    radial-gradient(circle at center top, rgba(42, 13, 10, 0.42), transparent 45%),
    var(--black);
  color: var(--ivory);
}

html:has(body.page-rankings),
body.page-rankings {
  overflow-y: auto;
  min-height: 100%;
}

.rankings-page-content {
  width: min(900px, calc(100% - 80px));
  margin: 0 auto;
  padding: 140px 0 150px;
}

.rankings-header {
  text-align: center;
  margin-bottom: 48px;
}

.rankings-header .eyebrow {
  color: var(--gold);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 14px;
   font-family: "Cinzel", serif;
}

.rankings-header h1 {
  margin: 0;
  font-family: muscle-narrow, sans-serif;
  /* font-size: clamp(54px, 9vw, 130px); */
  font-style: italic;
  color: var(--title);
  font-size: clamp(42px, 7vw, 96px);
  font-weight: 400;
  line-height: 0.9;
}

.rankings-intro {
  max-width: 520px;
  margin: 22px auto 0;
  color: rgba(248, 241, 223, 0.72);
  font-family: "adobe-jenson-pro-display", serif;
  font-size: 20px;
  line-height: 1.35;
}

.rankings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ranking-card {
  display: grid;
     grid-template-columns: 52px 54px 1fr 90px 70px;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(201, 164, 90, 0.35);
  background: rgba(3, 2, 2, 0.52);
  backdrop-filter: blur(8px);
   will-change: transform;
}

.nepo-headshot {
  width: 48px;
  height: 48px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  border: 1px solid rgba(201, 164, 90, 0.35);
}

.rank-number {
  color: var(--gold-bright);
  font-size: 24px;
  font-family: "Cinzel", serif;
  text-align: center;
}

.nepo-name {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 22px;
  font-weight: 400;
  text-transform: uppercase;
    font-family: "Cinzel", serif;
}

.nepo-relatives {
  margin: 0;
  color: rgba(248, 241, 223, 0.62);
  font-size: 14px;
  letter-spacing: 1px;
  line-height: 1;
  font-family: "adobe-jenson-pro-display", serif;
}

.nepo-relatives p{
  margin: 0;
}

.nepo-relatives a{
  color: var(--gold-dark);
}
.nepo-relatives a:hover{
  color: var(--gold);
}

.rank-change {
  color: rgba(201, 164, 90, 0.9);
  font-size: 13px;
  text-align: right;
}

.rank-change.up {
  color: #d8b86a;
}

.rank-change.down {
  color: #9c6f4b;
}

.rank-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rank-buttons button {
  pointer-events: auto;
  cursor: pointer;
  border: 1px solid rgba(201, 164, 90, 0.45);
  background: transparent;
  color: var(--gold);
  height: 28px;
  font-size: 14px;
}

.rank-buttons button:hover {
  color: var(--gold-bright);
  border-color: var(--gold-bright);
}

.vote-counts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: rgba(201, 164, 90, 0.78);
  font-size: 12px;
  text-align: right;
}

.rank-buttons button.is-disabled:not(.is-selected) {
  opacity: 0.28;
  cursor: not-allowed;
}

.rank-buttons button.is-selected {
  opacity: 1 !important;
  background: var(--gold-bright) !important;
  border-color: var(--gold-bright) !important;
  color: var(--black) !important;
  box-shadow:
    0 0 12px rgba(243, 210, 122, 0.22),
    inset 0 0 0 1px rgba(255,255,255,0.18);
  transform: translateY(-1px);
  cursor: default;
}

.rank-buttons button {
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}

.rank-buttons button:hover:not(:disabled) {
  color: var(--gold-bright);
  border-color: var(--gold-bright);

  background: rgba(201, 164, 90, 0.08);
}

@media (max-width: 700px) {
  .rankings-page-content {
    width: calc(100% - 44px);
    padding: 115px 0 150px;
  }

  .rankings-header h1 {
    font-size: clamp(42px, 16vw, 68px);
  }

  .ranking-card {
    grid-template-columns: 24px 36px minmax(0, 1fr) 34px 44px;
    gap: 8px;
    padding: 8px 6px;
  }

  .rank-number {
    font-size: 18px;
  }

  .nepo-headshot {
    width: 34px;
    height: 34px;
    border-radius: 7px;
  }

  .rank-info {
    min-width: 0;
  }

  .nepo-name {
    font-size: 16px;
    line-height: 1;
    white-space: normal;
  }

  .nepo-relatives {
    font-size: 12px;
    line-height: 1.05;
    letter-spacing: 0.05em;
  }

  .vote-counts {
    font-size: 10px;
    gap: 2px;
  }

  .rank-buttons {
    gap: 4px;
  }

  .rank-buttons button {
    height: 24px;
    font-size: 11px;
  }
}

body.page-tour {
  overflow-y: auto;
  background:
    radial-gradient(circle at center top, rgba(42, 13, 10, 0.38), transparent 42%),
    var(--black);
  color: var(--ivory);
}

body.page-tour .luxury-ui::before,
body.page-tour .luxury-ui::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  z-index: 1;
  pointer-events: none;
}

body.page-tour .luxury-ui::before {
  top: 0;
  height: 120px;
  background: linear-gradient(
    to bottom,
    var(--black) 33%,
    rgba(3, 2, 2, 0) 100%
  );
}

body.page-tour .luxury-ui::after {
  bottom: 0;
  height: 140px;
  background: linear-gradient(
    to top,
    var(--black) 30%,
    rgba(3, 2, 2, 0.92) 60%,
    rgba(3, 2, 2, 0) 100%
  );
}

.tour-page-content {
  width: min(900px, calc(100% - 80px));
  margin: 0 auto;
  padding: 150px 0 170px;
}

.tour-header {
  text-align: center;
  margin-bottom: 70px;
}

.tour-header .eyebrow {
  color: var(--gold);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 14px;
  font-family: "Cinzel", serif;
}

.tour-header h1 {
  margin: 0;
  font-family: muscle-narrow, sans-serif;
  font-size: clamp(54px, 9vw, 130px);
  font-style: italic;
  font-weight: 400;
  color: var(--title);
  line-height: 0.85;
}

.tour-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tour-row {
  display: grid;
  grid-template-columns: 140px 1fr 220px;
  gap: 34px;
  padding: 24px 0;
  border-top: 1px solid rgba(201, 164, 90, 0.28);
  color: var(--gold);
  font-family: "adobe-jenson-pro-display", serif;
  font-size: clamp(18px, 1.5vw, 25px);
}

.tour-row:last-child {
  border-bottom: 1px solid rgba(201, 164, 90, 0.28);
}

.tour-row div:nth-child(3) {
  text-align: right;
}

@media (max-width: 700px) {
  .tour-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .tour-row div:nth-child(3) {
    text-align: left;
  }
}