:root {
  color-scheme: dark;
  --bg: #1b1f22;
  --panel: rgba(27, 31, 34, 0.78);
  --panel-strong: rgba(27, 31, 34, 0.92);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --soft: rgba(255, 255, 255, 0.075);
  --soft-2: rgba(255, 255, 255, 0.15);
  --line: rgba(255, 255, 255, 0.56);
  --line-strong: #ffffff;
  --accent: #8cc6d8;
  --accent-2: #d8b98c;
  --danger: #e8a0a8;
  font-family: "Source Sans Pro", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-weight: 300;
  letter-spacing: 0;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(to top, rgba(19, 21, 25, 0.72), rgba(19, 21, 25, 0.72)),
    radial-gradient(rgba(0, 0, 0, 0.24) 24%, rgba(0, 0, 0, 0) 56%),
    url("/assets/chrismurphy-bg.jpg") center / cover no-repeat;
}

.site-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%);
  background-size: 6px 6px;
  opacity: 0.34;
}

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 100vh;
  padding: 46px 0 54px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand span,
.pill,
.meta,
.service p,
.note {
  color: var(--muted);
}

.brand .brand-mark {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.04);
}

.brand div span {
  display: block;
  margin-top: 3px;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(27, 31, 34, 0.38);
}

.pill {
  min-height: 2.55rem;
  padding: 0 1.05rem;
  display: inline-flex;
  align-items: center;
  border-right: 1px solid var(--line);
  border-radius: 0;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: transparent;
  transition: background-color 180ms ease, color 180ms ease;
}

.pill:last-child {
  border-right: 0;
}

.pill:hover,
.pill:focus-visible {
  background: var(--soft);
  color: var(--text);
  outline: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.36fr);
  gap: 26px;
  align-items: stretch;
  margin-bottom: 30px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(2px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  width: fit-content;
  font-size: clamp(2.15rem, 5vw, 4.2rem);
  line-height: 1.04;
  margin: 0;
  max-width: 820px;
  letter-spacing: 0;
  font-weight: 600;
}

.lede {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 600px;
  margin: 20px 0 0;
}

.status {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  line-height: 1.5;
}

.status strong {
  color: var(--text);
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.section {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
}

.section h2 {
  width: fit-content;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line-strong);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text);
  margin: 0 0 18px;
  font-weight: 600;
}

.service {
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.045);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 0 transparent;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.service::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 18%, var(--card-glow, rgba(255, 255, 255, 0.14)), transparent 34%),
    linear-gradient(135deg, var(--card-wash, rgba(255, 255, 255, 0.055)), transparent 58%);
  opacity: 0.74;
  pointer-events: none;
}

.service > * {
  position: relative;
  z-index: 1;
}

.service:hover,
.service:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--soft);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  outline: none;
}

.service h3 {
  margin: 0 0 10px;
  font-size: 1.38rem;
  letter-spacing: 0;
  font-weight: 600;
}

.service p {
  margin: 0;
  line-height: 1.45;
}

.service-art {
  position: relative;
  width: 3.35rem;
  height: 3.35rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.055);
}

.service-jellyfin {
  --card-glow: rgba(133, 82, 192, 0.52);
  --card-wash: rgba(0, 164, 220, 0.12);
}

.jellyfin-art::before {
  content: "";
  width: 2rem;
  height: 2rem;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: conic-gradient(from 45deg, #00a4dc, #7f4ac9, #aa5cc3, #00a4dc);
  box-shadow: 0 0 18px rgba(127, 74, 201, 0.55);
}

.jellyfin-art::after {
  content: "";
  position: absolute;
  width: 0.82rem;
  height: 0.82rem;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: #1b1f22;
}

.service-plex {
  --card-glow: rgba(229, 160, 13, 0.48);
  --card-wash: rgba(229, 160, 13, 0.14);
}

.plex-art::before {
  content: "";
  width: 2rem;
  height: 2rem;
  clip-path: polygon(16% 0, 50% 0, 84% 50%, 50% 100%, 16% 100%, 50% 50%);
  background: #e5a00d;
  filter: drop-shadow(0 0 14px rgba(229, 160, 13, 0.48));
}

.service-requests {
  --card-glow: rgba(140, 198, 216, 0.42);
  --card-wash: rgba(232, 160, 168, 0.1);
}

.requests-art {
  background:
    radial-gradient(circle, rgba(140, 198, 216, 0.18) 0 18%, transparent 19%),
    repeating-radial-gradient(circle, transparent 0 31%, rgba(255, 255, 255, 0.24) 32% 34%, transparent 35% 48%),
    rgba(0, 0, 0, 0.24);
}

.requests-art::before {
  content: "";
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: conic-gradient(from -35deg, rgba(140, 198, 216, 0.84), rgba(140, 198, 216, 0.08) 36%, transparent 37%);
  mask: radial-gradient(circle, transparent 0 32%, #000 33%);
}

.requests-art::after {
  content: "";
  position: absolute;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(140, 198, 216, 0.74);
}

.service-network {
  --card-glow: rgba(105, 170, 255, 0.42);
  --card-wash: rgba(105, 170, 255, 0.12);
}

.unifi-art::before {
  content: "";
  width: 2.26rem;
  height: 2.26rem;
  background: url("/assets/ubiquiti.svg") center / contain no-repeat;
  filter: drop-shadow(0 0 14px rgba(105, 170, 255, 0.54));
}

.service-modem {
  --card-glow: rgba(124, 216, 171, 0.38);
  --card-wash: rgba(124, 216, 171, 0.12);
}

.modem-art::before {
  content: "";
  width: 2.1rem;
  height: 1.36rem;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 4px;
  background:
    radial-gradient(circle at 72% 50%, #7cd8ab 0 0.14rem, transparent 0.15rem),
    radial-gradient(circle at 52% 50%, rgba(255, 255, 255, 0.82) 0 0.11rem, transparent 0.12rem);
  box-shadow: 0 0 16px rgba(124, 216, 171, 0.42);
}

.modem-art::after {
  content: "";
  position: absolute;
  width: 1.2rem;
  height: 0.42rem;
  border: 2px solid rgba(255, 255, 255, 0.58);
  border-bottom: 0;
  border-radius: 1rem 1rem 0 0;
  transform: translateY(-1rem);
}

.service-dns {
  --card-glow: rgba(232, 92, 92, 0.38);
  --card-wash: rgba(232, 92, 92, 0.1);
}

.dns-art::before {
  content: "";
  width: 2rem;
  height: 2.2rem;
  clip-path: polygon(50% 0, 92% 16%, 84% 78%, 50% 100%, 16% 78%, 8% 16%);
  background:
    radial-gradient(circle at 50% 43%, #1b1f22 0 0.33rem, transparent 0.34rem),
    linear-gradient(145deg, #ff7676, #b82f4b);
  box-shadow: 0 0 18px rgba(232, 92, 92, 0.42);
}

.dns-art::after {
  content: "";
  position: absolute;
  width: 1.25rem;
  height: 0.22rem;
  border-radius: 999px;
  background: #1b1f22;
}

.service-home {
  --card-glow: rgba(90, 186, 255, 0.42);
  --card-wash: rgba(90, 186, 255, 0.11);
}

.home-art::before {
  content: "";
  width: 2rem;
  height: 2rem;
  clip-path: polygon(50% 6%, 92% 42%, 80% 42%, 80% 92%, 20% 92%, 20% 42%, 8% 42%);
  background: linear-gradient(145deg, #79d5ff, #2d8fe6);
  box-shadow: 0 0 16px rgba(90, 186, 255, 0.46);
}

.home-art::after {
  content: "";
  position: absolute;
  width: 0.48rem;
  height: 0.7rem;
  border-radius: 3px 3px 0 0;
  background: #1b1f22;
  transform: translateY(0.62rem);
}

.service-photos {
  --card-glow: rgba(255, 132, 169, 0.38);
  --card-wash: rgba(255, 132, 169, 0.1);
}

.photos-art::before {
  content: "";
  width: 2.1rem;
  height: 1.65rem;
  border: 2px solid rgba(255, 255, 255, 0.76);
  border-radius: 4px;
  background:
    radial-gradient(circle at 76% 28%, #ffd27d 0 0.17rem, transparent 0.18rem),
    linear-gradient(135deg, transparent 48%, rgba(255, 255, 255, 0.72) 49% 57%, transparent 58%),
    linear-gradient(145deg, rgba(255, 132, 169, 0.75), rgba(90, 186, 255, 0.55));
  box-shadow: 0 0 16px rgba(255, 132, 169, 0.38);
}

.photos-art::after {
  content: "";
  position: absolute;
  width: 1.5rem;
  height: 0.22rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  transform: translateY(1.05rem);
}

.service-downloads {
  --card-glow: rgba(93, 208, 160, 0.4);
  --card-wash: rgba(93, 208, 160, 0.1);
}

.downloads-art::before {
  content: "";
  width: 1.65rem;
  height: 2.15rem;
  clip-path: polygon(35% 0, 65% 0, 65% 46%, 91% 46%, 50% 88%, 9% 46%, 35% 46%);
  background: linear-gradient(180deg, #a3ffd7, #36b986);
  filter: drop-shadow(0 0 14px rgba(93, 208, 160, 0.48));
}

.downloads-art::after {
  content: "";
  position: absolute;
  width: 2rem;
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  transform: translateY(1rem);
}

.service-printer {
  --mainsail-color: #f04444;
  --card-glow: rgba(240, 68, 68, 0.36);
  --card-wash: rgba(240, 68, 68, 0.09);
}

.printer-two {
  --mainsail-color: #4aa3ff;
  --card-glow: rgba(74, 163, 255, 0.34);
  --card-wash: rgba(74, 163, 255, 0.08);
}

.printer-three {
  --mainsail-color: #a66bff;
  --card-glow: rgba(166, 107, 255, 0.34);
  --card-wash: rgba(166, 107, 255, 0.08);
}

.printer-four {
  --mainsail-color: #59d98e;
  --card-glow: rgba(124, 216, 171, 0.34);
  --card-wash: rgba(124, 216, 171, 0.08);
}

.mainsail-art::before {
  content: "";
  width: 2.45rem;
  height: 2.45rem;
  background: var(--mainsail-color);
  -webkit-mask: url("/assets/mainsail-logo.png") center / contain no-repeat;
  mask: url("/assets/mainsail-logo.png") center / contain no-repeat;
  filter: drop-shadow(0 0 14px var(--card-glow));
}

.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tag.warning {
  border-color: rgba(216, 185, 140, 0.72);
  background: rgba(216, 185, 140, 0.12);
  color: var(--accent-2);
}

.tag.private {
  border-color: rgba(232, 160, 168, 0.72);
  background: rgba(232, 160, 168, 0.1);
  color: var(--danger);
}

.note {
  margin: 0;
  line-height: 1.5;
  font-size: 0.9rem;
  border-left: 4px solid var(--line-strong);
  padding: 0 0 0 14px;
}

.footer {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  color: var(--muted);
}

.quiet-admin {
  border-bottom: dotted 1px rgba(255, 255, 255, 0.5);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.86rem;
  text-decoration: none;
}

.quiet-admin:hover,
.quiet-admin:focus-visible {
  border-bottom-color: transparent;
  color: var(--text);
  outline: none;
}

.admin-only {
  display: none;
}

.lan-mode .admin-only {
  display: block;
}

@media (max-width: 820px) {
  .topbar,
  .hero {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
  }

  .pill {
    flex: 1 1 50%;
    justify-content: center;
    border-top: 1px solid var(--line);
  }

  .pill:nth-child(1),
  .pill:nth-child(2) {
    border-top: 0;
  }

  .pill:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 24px, 1080px);
    padding-top: 26px;
  }

  .hero,
  .section {
    padding: 18px;
  }

  .pill {
    flex-basis: 100%;
    border-right: 0;
  }

  .pill:nth-child(2) {
    border-top: 1px solid var(--line);
  }
}
