:root {
  --bg: #000000;
  --bg-alt: #0a0f0a;
  --text: #a8b8a8;
  --green: #39ff14;
  --green-dim: #1f8f0d;
  --border: #123314;
}

* { box-sizing: border-box; }

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 16px;
  line-height: 1.6;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(57, 255, 20, 0.03) 0px,
    rgba(57, 255, 20, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 1;
}

.wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  position: relative;
  z-index: 2;
}

.hero {
  text-align: center;
  padding-top: 20px;
}

.logo-wrap {
  position: relative;
  display: inline-block;
  max-width: 600px;
  width: 100%;
}

.glitch-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.logo {
  width: 100%;
  max-width: 600px;
  height: auto;
  display: block;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.logo-wrap:hover .logo {
  filter: url(#glitch-distort);
}

.logo-wrap::before,
.logo-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("dc909.jpeg") center/contain no-repeat;
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
}

.logo-wrap::before { filter: saturate(3) brightness(1.1); }
.logo-wrap::after { filter: grayscale(1) brightness(2.4); }

.logo-wrap:hover::before {
  opacity: 0.65;
  animation: glitch-slice-a 0.5s steps(2, end) infinite;
}

.logo-wrap:hover::after {
  opacity: 0.65;
  animation: glitch-slice-b 0.5s steps(2, end) infinite;
}

/* Thin misaligned color-channel bands — subtle, no whole-image movement */
@keyframes glitch-slice-a {
  0%   { transform: translateX(0); clip-path: inset(0 0 88% 0); }
  20%  { transform: translateX(-1.5px); clip-path: inset(12% 0 60% 0); }
  40%  { transform: translateX(1.5px); clip-path: inset(40% 0 35% 0); }
  60%  { transform: translateX(-1px); clip-path: inset(62% 0 15% 0); }
  80%  { transform: translateX(1px); clip-path: inset(80% 0 4% 0); }
  100% { transform: translateX(0); clip-path: inset(0 0 88% 0); }
}

@keyframes glitch-slice-b {
  0%   { transform: translateX(0); clip-path: inset(85% 0 0 0); }
  20%  { transform: translateX(1.5px); clip-path: inset(55% 0 25% 0); }
  40%  { transform: translateX(-1.5px); clip-path: inset(25% 0 55% 0); }
  60%  { transform: translateX(1px); clip-path: inset(10% 0 75% 0); }
  80%  { transform: translateX(-1px); clip-path: inset(3% 0 90% 0); }
  100% { transform: translateX(0); clip-path: inset(85% 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-wrap:hover .logo {
    filter: none;
  }
  .logo-wrap:hover::before,
  .logo-wrap:hover::after {
    animation: none;
  }
}

.tagline {
  margin: 20px 0 0;
  color: var(--green);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
}

main {
  margin-top: 48px;
}

.intro p {
  margin: 0 0 14px;
}

.intro .section-head {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px dotted var(--border);
}

.intro .section-head--first {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.prompt {
  color: var(--green);
  font-weight: bold;
  margin-right: 8px;
}

.intro strong {
  color: var(--green);
  font-weight: bold;
}

.intro a {
  color: var(--green);
}

.intro a:visited {
  color: #ffffff;
}

.intro a:hover {
  color: #ffffff;
}

.principles {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.principles li {
  margin: 0 0 8px;
  padding-left: 20px;
  position: relative;
}

.principles li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--green-dim);
}

.principles strong {
  color: var(--green);
  font-weight: bold;
}

.friends {
  margin: 0 0 14px;
}

.friend-group {
  border: 1px solid var(--border);
  background: var(--bg-alt);
  margin-bottom: 10px;
  padding: 12px 16px;
}

.friend-group summary {
  cursor: pointer;
  font-weight: bold;
  color: var(--green);
  list-style: none;
}

.friend-group summary::-webkit-details-marker {
  display: none;
}

.friend-group summary::before {
  content: "▸ ";
  color: var(--green-dim);
}

.friend-group[open] summary::before {
  content: "▾ ";
}

.friend-group ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.friend-group li {
  margin: 0 0 6px;
  padding-left: 16px;
  position: relative;
}

.friend-group li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--green-dim);
}

.links {
  margin-top: 0;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.link-card {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 20px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.link-card:hover {
  border-color: var(--green);
  color: var(--green);
  background: #06140a;
}

.link-primary {
  border-color: var(--green-dim);
}

.link-label {
  font-weight: bold;
  letter-spacing: 0.04em;
}

.link-sub {
  font-size: 13px;
  color: var(--green-dim);
}

.link-card:hover .link-sub {
  color: var(--green);
}

footer {
  margin-top: 60px;
  text-align: center;
  font-size: 13px;
  color: var(--green-dim);
  border-top: 1px dotted var(--border);
  padding-top: 20px;
}

@media (max-width: 480px) {
  .links {
    gap: 10px;
  }
  .link-card {
    flex-direction: column;
    gap: 4px;
  }
}

.doom-trigger {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 5;
}

.doom-trigger .doom-helmet,
.doom-trigger .doom-visor,
.doom-trigger .doom-jaw {
  fill: var(--bg);
  transition: fill 0.15s ease;
}

.doom-trigger:hover .doom-helmet,
.doom-trigger:focus-visible .doom-helmet {
  fill: #4a5d23;
}

.doom-trigger:hover .doom-visor,
.doom-trigger:focus-visible .doom-visor {
  fill: #8fd3ff;
}

.doom-trigger:hover .doom-jaw,
.doom-trigger:focus-visible .doom-jaw {
  fill: #d8b48c;
}

.doom-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doom-overlay[hidden] {
  display: none;
}

.doom-frame {
  width: 100%;
  height: 100%;
  border: none;
}

.doom-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 101;
  background: var(--bg-alt);
  color: var(--green);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 13px;
  padding: 8px 14px;
  cursor: pointer;
}

.doom-close:hover {
  color: #ffffff;
  border-color: var(--green);
}
