/* SUPA COMPANY
   1996 page, 90s MTV on top. No frameworks, no build step. */

:root {
  --ink: #000;
  --paper: #fff;
  --gray: #c0c0c0;
  --link: #0000ee;
  --visited: #551a8b;
  --red: #ff0000;
  --pink: #ff2bd6;
  --yellow: #fff200;
  --cyan: #00e5ff;
  --lime: #39ff14;
  --chyron: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pixel: "Courier New", Courier, monospace;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 18px/1.45 "Times New Roman", Times, serif;
}

a { color: var(--link); }
a:visited { color: var(--visited); }
a:hover { background: var(--yellow); }

h1, h2 { font-weight: bold; margin: 0.6em 0 0.3em; }
h1 { font-size: 1.6em; }
h2 { font-size: 1.25em; }

hr {
  border: 0;
  border-top: 1px solid #808080;
  border-bottom: 1px solid #fff;
  box-shadow: 0 1px 0 #808080;
  margin: 1.5em 0;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- TV header ---------- */

.tv {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 4px solid var(--ink);
}

.static {
  position: absolute;
  inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.55;
  animation: snow 0.4s steps(4) infinite;
}

@keyframes snow {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-7%, 4%); }
  50%  { transform: translate(5%, -6%); }
  75%  { transform: translate(-3%, -2%); }
  100% { transform: translate(6%, 5%); }
}

.logo {
  position: relative;
  display: block;
  transform: rotate(-9deg);
  transition: transform 0.15s;
}
.logo:hover { background: none; transform: rotate(6deg) scale(1.06); }
.logo img {
  display: block;
  width: 150px;
  height: 150px;
  filter: drop-shadow(6px 6px 0 var(--ink));
}

.bug {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font: bold 13px/1 var(--chyron);
  letter-spacing: 0.15em;
  color: #fff;
  opacity: 0.8;
}
.bug::before { content: "\25CF  "; color: var(--red); }

/* ---------- ticker ---------- */

.ticker {
  overflow: hidden;
  white-space: nowrap;
  background: var(--yellow);
  border-bottom: 4px solid var(--ink);
  font: bold 14px/28px var(--pixel);
}
.ticker span {
  display: inline-block;
  padding-left: 100%;
  animation: scroll 22s linear infinite;
}
@keyframes scroll { to { transform: translateX(-100%); } }

/* ---------- nav ---------- */

.nav { margin: 1em 0 0; font-family: var(--pixel); font-size: 16px; }

/* ---------- projects, as MTV video credits ---------- */

.projects { list-style: none; margin: 0; padding: 0; }

.chyron {
  position: relative;
  margin: 0 0 28px;
  padding: 14px 16px 16px 18px;
  border-left: 6px solid var(--ink);
  font-family: var(--chyron);
  font-size: 15px;
  line-height: 1.35;
}
.chyron > b, .chyron > q, .chyron > span, .chyron > small { display: block; }
.chyron > b { font-weight: normal; }
.chyron > q { font-size: 1.9em; font-weight: bold; letter-spacing: -0.02em; line-height: 1.1; }
.chyron > small { color: #555; font-size: 13px; }

.chyron:nth-child(4n+1) { border-color: var(--pink); }
.chyron:nth-child(4n+2) { border-color: var(--yellow); }
.chyron:nth-child(4n+3) { border-color: var(--cyan); }
.chyron:nth-child(4n+4) { border-color: var(--lime); }

.sticker {
  position: absolute;
  top: 8px;
  right: 0;
  padding: 3px 10px;
  border: 2px solid var(--ink);
  font: bold 13px/1.2 var(--chyron);
  text-transform: uppercase;
  transform: rotate(4deg);
  box-shadow: 3px 3px 0 var(--ink);
}
.chyron:nth-child(even) .sticker { transform: rotate(-5deg); }
.sticker.pink   { background: var(--pink); color: #fff; }
.sticker.yellow { background: var(--yellow); }
.sticker.cyan   { background: var(--cyan); }
.sticker.lime   { background: var(--lime); }
.sticker.red    { background: var(--red); color: #fff; }
.sticker.wip {
  background: var(--yellow);
  border: 5px solid;
  border-image: repeating-linear-gradient(-45deg, var(--ink) 0 5px, var(--yellow) 5px 10px) 5;
}

/* Win95 bevel button */
.btn,
.btn:visited {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 14px;
  background: var(--gray);
  color: var(--ink);
  font: 14px/1.4 var(--pixel);
  text-decoration: none;
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #dfdfdf;
}
.btn:hover { background: var(--gray); text-decoration: underline; }
.btn:active {
  border-color: #404040 #fff #fff #404040;
  box-shadow: inset 1px 1px 0 #808080;
}

/* ---------- footer, 88x31 buttons ---------- */

footer { padding-bottom: 32px; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }

.badge {
  display: inline-block;
  width: 88px;
  height: 31px;
  padding-top: 3px;
  background: var(--ink);
  color: var(--lime);
  border: 1px solid #808080;
  outline: 1px solid var(--ink);
  font: 9px/1.2 var(--pixel);
  text-align: center;
}
.badge b { font-size: 11px; color: #fff; }
.badge.alt { background: #000080; color: var(--yellow); }

/* ---------- 404 ---------- */

.nosignal .tv { height: 100vh; border: 0; flex-direction: column; }
.nosignal h1 {
  position: relative;
  margin: 0;
  padding: 6px 18px;
  background: #000;
  color: #fff;
  font: bold 32px/1.2 var(--pixel);
}
.nosignal p { position: relative; margin: 12px 16px; background: #000; color: #fff; padding: 4px 10px; font-family: var(--pixel); }
.nosignal a, .nosignal a:visited { color: var(--yellow); }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .static, .ticker span { animation: none; }
  .ticker span { padding-left: 16px; }
}

@media (max-width: 480px) {
  body { font-size: 17px; }
  .tv { height: 180px; }
  .logo img { width: 120px; height: 120px; }
  .chyron > .sticker { position: static; display: inline-block; margin-bottom: 8px; }
}
