:root {
  color-scheme: dark;
  --black: #070407;
  --deep-purple: #100812;
  --purple: #1b0d20;
  --dirty-purple: #2a142b;
  --cream: #d8c6a3;
  --old-yellow: #c39a54;
  --burnt-orange: #8b4a2f;
  --text: #c8b9ad;
  --muted: #76666f;
  --bg: var(--black);
  --panel: var(--purple);
  --panel-strong: var(--dirty-purple);
  --panel-soft: #201021;
  --amber: var(--burnt-orange);
  --gold: var(--old-yellow);
  --blood: #5d1d2a;
  --wine: #1a0917;
  --violet: #32183a;
  --plum: #0b050d;
  --lavender: #8b596f;
  --olive: #6c6342;
  --ash: #5f5561;
  --red: #b05b3f;
  --border-dark: #050207;
  --border-light: #3b2639;
  --shadow: rgba(0, 0, 0, 0.84);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  background-color: var(--bg);
  background:
    repeating-linear-gradient(45deg, rgba(216, 198, 163, 0.045) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(135deg, rgba(139, 74, 47, 0.055) 0 1px, transparent 1px 27px),
    radial-gradient(circle at 18% 4%, rgba(42, 20, 43, 0.34), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(139, 74, 47, 0.1), transparent 32%),
    linear-gradient(180deg, #100812 0, #070407 48%, #030203 100%);
  background-position: 0 0, 0 0, 0 0;
  background-size: auto;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.42) 0,
    rgba(0, 0, 0, 0.42) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: multiply;
  opacity: 0.3;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--gold);
}

a:hover,
a:focus-visible {
  color: #d6b678;
}

.page-scanline {
  position: fixed;
  inset: 0;
  z-index: 19;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 22%, transparent 0 34%, rgba(0, 0, 0, 0.34) 72%),
    repeating-linear-gradient(115deg, rgba(195, 154, 84, 0.025) 0 1px, transparent 1px 10px);
  mix-blend-mode: soft-light;
  opacity: 0.28;
}

.site-shell {
  width: min(1120px, calc(100% - 24px));
  margin: 0 auto;
  padding: 24px 0;
}

.site-shell::before {
  content: "[ chrisHQ // transmission incomplete ]   LAST LOGIN: 02:13:07   STATUS: " attr(data-status) "   SIGNAL: weak";
  display: block;
  margin: 0 0 8px;
  color: rgba(195, 154, 84, 0.46);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.72rem;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-shadow: 1px 0 rgba(107, 37, 55, 0.45), -1px 0 rgba(38, 56, 74, 0.35);
}

.site-header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  margin-bottom: 18px;
  border: 2px solid #3c2a3c;
  border-right-color: var(--border-dark);
  border-bottom-color: var(--border-dark);
  background: #080409;
  box-shadow:
    8px 8px 0 rgba(0, 0, 0, 0.68),
    0 18px 40px rgba(0, 0, 0, 0.78);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  padding: 14px 16px;
  color: var(--text);
  text-decoration: none;
  background:
    repeating-linear-gradient(45deg, rgba(216, 198, 163, 0.045) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, #241026 0, #150716 58%, #080409 100%);
  border-right: 2px solid #050207;
}

.brand-kicker {
  color: var(--gold);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
  text-shadow: 1px 1px 0 #000000;
}

.brand-name {
  color: var(--cream);
  font-family: "Courier New", Courier, monospace;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: 2px 2px 0 #000000, 3px 3px 0 rgba(139, 74, 47, 0.62);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0;
}

.main-nav a {
  display: flex;
  align-items: center;
  min-height: 100%;
  padding: 14px 16px;
  border-left: 1px solid #130b14;
  border-right: 1px solid #2b1a2b;
  color: #bba99b;
  text-decoration: none;
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  background: #0b060c;
  text-shadow: 1px 1px 0 #000000;
  transition: background-color 90ms steps(2, end), color 90ms steps(2, end), transform 90ms steps(2, end), text-shadow 90ms steps(2, end);
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: #d6b678;
  background: #211020;
  text-shadow:
    2px 0 #6b2537,
    -2px 0 #26384a;
  transform: translateX(1px);
}

.main-nav a.is-active {
  color: var(--old-yellow);
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 7px),
    #160a17;
  box-shadow: inset 0 -2px rgba(139, 74, 47, 0.76);
  text-shadow:
    1px 0 rgba(107, 37, 55, 0.8),
    -1px 0 rgba(38, 56, 74, 0.65);
}

.page-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.page-grid-wide {
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
}

.single-column {
  max-width: 920px;
  margin: 0 auto;
}

.home-layout {
  max-width: 980px;
}

.content-window {
  min-width: 0;
  border: 2px solid var(--border-light);
  border-right-color: var(--border-dark);
  border-bottom-color: var(--border-dark);
  background:
    linear-gradient(
      180deg,
      rgba(35, 15, 35, 0.9),
      rgba(8, 4, 9, 0.96)
    );
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.8),
    7px 7px 0 rgba(0, 0, 0, 0.62),
    inset 0 1px rgba(210, 150, 190, 0.08);
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 7px 10px;
  color: var(--cream);
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  text-shadow: 1px 1px 0 #000000;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.24) 0 3px, transparent 3px 8px),
    linear-gradient(180deg, #3c1839 0, #211020 48%, #0b050d 100%);
  border-bottom: 2px solid var(--border-dark);
}

.window-controls {
  white-space: nowrap;
}

.window-body {
  padding: 22px;
  position: relative;
  background:
    repeating-linear-gradient(45deg, rgba(216, 198, 163, 0.035) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(0deg, rgba(195, 154, 84, 0.026) 0 1px, transparent 1px 24px),
    linear-gradient(180deg, rgba(16, 8, 18, 0.96), rgba(7, 4, 7, 0.98));
  background-size: auto;
}

h1,
h2,
h3 {
  margin: 0 0 14px;
  color: var(--cream);
  font-family: "Courier New", Courier, monospace;
  line-height: 1.15;
  letter-spacing: 0;
}

h1 {
  font-size: 2.2rem;
  text-shadow: 2px 2px 0 #000000, 4px 4px 0 rgba(42, 20, 43, 0.92);
}

h2 {
  font-size: 1.45rem;
  color: #a67583;
  text-shadow: 1px 1px 0 #000000;
}

h3 {
  font-size: 1.08rem;
  color: #a49361;
  text-shadow: 1px 1px 0 #000000;
}

p {
  margin: 0 0 1rem;
}

.rich-text {
  max-width: 72ch;
}

.rich-text ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.rich-text li::marker {
  color: var(--gold);
}

.rich-text strong {
  color: #d6b678;
}

body[data-section="home"] .window-body {
  padding-top: 30px;
  padding-bottom: 28px;
  background:
    repeating-linear-gradient(45deg, rgba(216, 198, 163, 0.028) 0 1px, transparent 1px 14px),
    linear-gradient(180deg, rgba(11, 5, 13, 0.98), rgba(4, 2, 5, 0.98));
}

body[data-section="home"] h1 {
  margin: 8px 0 24px;
  font-size: 2.05rem;
}

body[data-section="home"] .rich-text > h2:first-child {
  color: #8b596f;
}

.ticker {
  overflow: hidden;
  margin: 0 0 18px;
  padding: 6px 8px;
  border: 1px solid rgba(139, 74, 47, 0.42);
  color: rgba(195, 154, 84, 0.8);
  font-family: "Courier New", Courier, monospace;
  white-space: nowrap;
  background: #050305;
}

.ticker span {
  display: inline-block;
  min-width: 100%;
  animation: ticker-crawl 20s linear infinite;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.portal-link {
  display: grid;
  gap: 8px;
  min-height: 136px;
  padding: 14px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  border: 2px solid var(--border-light);
  border-right-color: var(--border-dark);
  border-bottom-color: var(--border-dark);
  background: #0b060c;
}

.portal-link:hover,
.portal-link:focus-visible {
  color: var(--text);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.72);
}

.portal-link::before,
.portal-link::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.portal-link::before {
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(42, 20, 43, 0.62), rgba(7, 4, 7, 0.9)),
    var(--panel-strong);
  filter: grayscale(70%) contrast(130%) brightness(30%) sepia(20%);
  opacity: 0.45;
  transform: scale(1.02);
}

.portal-link::after {
  z-index: 1;
  background:
    repeating-linear-gradient(90deg, rgba(216, 198, 163, 0.045) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, rgba(7, 4, 7, 0.28), rgba(0, 0, 0, 0.82));
}

.portal-title {
  position: relative;
  z-index: 2;
  color: var(--cream);
  font-family: "Courier New", Courier, monospace;
  font-size: 1.15rem;
  font-weight: 700;
  text-shadow: 2px 2px 0 #000000;
}

.portal-copy {
  position: relative;
  z-index: 2;
  color: var(--muted);
  font-size: 0.95rem;
}

.portal-deadframe::before {
  background: url("DeadFrame Screenshots/picture2.png") center / cover;
}

.portal-deadframe .portal-title,
.portal-deadframe .portal-copy {
  color: var(--cream);
  text-shadow: 2px 2px 0 #000000;
}

.portal-blogs::before {
  background: url("assets/blog-night.png") center / cover;
}

.portal-music::before {
  background: url("assets/music-room.png") center / cover;
}

.gallery-window .window-body {
  padding-bottom: 14px;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.screenshot-grid a {
  display: block;
  overflow: hidden;
  border: 2px solid var(--border-light);
  border-right-color: var(--border-dark);
  border-bottom-color: var(--border-dark);
  background: #000000;
}

.screenshot-grid a:first-child {
  grid-column: 1 / -1;
}

.screenshot-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 160ms ease, filter 160ms ease;
}

.screenshot-grid a:hover img,
.screenshot-grid a:focus-visible img {
  transform: scale(1.035);
  filter: brightness(0.86) contrast(1.18) sepia(0.12);
}

.download-embed {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dotted rgba(118, 102, 111, 0.52);
}

.download-embed iframe {
  display: block;
  width: 100%;
  max-width: 552px;
  height: 167px;
  border: 0;
  background: #050609;
}

.dead-frame-logo-wrap {
  margin-bottom: 18px;
  padding: 8px;
  border: 2px solid var(--border-dark);
  border-right-color: var(--border-light);
  border-bottom-color: var(--border-light);
  background: #000000;
  box-shadow: inset 0 0 34px rgba(42, 20, 43, 0.68);
}

.dead-frame-logo {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #000000;
}

.blog-list {
  display: grid;
  gap: 18px;
}

.blog-entry {
  border: 2px solid var(--border-light);
  border-right-color: var(--border-dark);
  border-bottom-color: var(--border-dark);
  background:
    linear-gradient(180deg, rgba(27, 13, 32, 0.94), rgba(7, 4, 7, 0.96));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.62);
}

.blog-entry-header {
  padding: 12px 14px;
  border-bottom: 2px solid var(--border-dark);
  background:
    repeating-linear-gradient(90deg, rgba(216, 198, 163, 0.04) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, #201021 0, #0b050d 100%);
}

.blog-entry h2 {
  margin-bottom: 6px;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
}

.blog-tag {
  color: #130b08;
  background: rgba(195, 154, 84, 0.84);
  padding: 0 6px;
}

.blog-entry-body {
  padding: 14px;
}

.music-window .window-body {
  min-height: 420px;
  background:
    repeating-linear-gradient(90deg, rgba(216, 198, 163, 0.032) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(0deg, rgba(139, 74, 47, 0.05) 0 1px, transparent 1px 34px),
    linear-gradient(180deg, rgba(7, 4, 7, 0.9), rgba(7, 4, 7, 0.98)),
    url("assets/music-room.png") center / cover;
}

.load-error {
  color: var(--red);
  font-family: "Courier New", Courier, monospace;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 10px 12px;
  color: rgba(216, 198, 163, 0.66);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
  text-shadow: 1px 1px 0 #000000;
  border-top: 1px dotted rgba(118, 102, 111, 0.42);
}

@keyframes ticker-crawl {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-40%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 880px) {
  .site-header,
  .page-grid,
  .page-grid-wide {
    grid-template-columns: 1fr;
  }

  .site-header {
    display: grid;
  }

  .main-nav {
    justify-content: stretch;
  }

  .main-nav a {
    flex: 1 1 50%;
    justify-content: center;
    border-top: 1px solid rgba(216, 198, 163, 0.1);
  }

  .portal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-shell {
    width: min(100% - 16px, 1180px);
    padding: 12px 0;
  }

  .brand-link {
    min-width: 0;
    flex-wrap: wrap;
  }

  .brand-name {
    font-size: 1.35rem;
  }

  .main-nav a {
    flex-basis: 100%;
    min-height: 44px;
  }

  .window-body {
    padding: 16px;
  }

  h1 {
    font-size: 1.82rem;
  }

  body[data-section="home"] h1 {
    font-size: 1.72rem;
  }

  .screenshot-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
  }
}
