:root {
  color-scheme: dark;
  --background: #111513;
  --surface: #191e1b;
  --surface-hover: #1d2420;
  --text: #f0f2ef;
  --muted: #9ba49e;
  --faint: #66716a;
  --border: #2b342e;
  --accent: #b1b108;
  --accent-dark: #26351d;
  --content-width: 1120px;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 14px/1.5 Inter, Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
[hidden] { display: none !important; }

/* Header */
.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(20px, calc((100% - var(--content-width)) / 2));
  border-bottom: 1px solid var(--border);
  background: rgb(17 21 19 / 94%);
  backdrop-filter: blur(10px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  display: block;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 5px;
  object-fit: cover;
}
.brand-name { font: 14px Aldrich, sans-serif; letter-spacing: 1.1px; }
.brand-dot, h1 span { color: var(--accent); }
.main-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font-size: 12px;
  transition: border-color 160ms, background 160ms;
}
.main-link:hover { border-color: #46533f; background: var(--surface); }
.discord-icon { width: 17px; height: 17px; }
.external-arrow { color: var(--accent); font-size: 14px; }

/* Intro and search */
.container { width: 100%; max-width: var(--content-width); margin: 0 auto; padding: 0 24px; }
.intro { padding: 68px 0 34px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font: 10px Aldrich, monospace;
  letter-spacing: 1.8px;
}
.eyebrow-line { width: 24px; height: 2px; background: var(--accent); }
h1 { margin: 18px 0 8px; font-size: clamp(32px, 5vw, 48px); font-weight: 600; line-height: 1.13; letter-spacing: -1.8px; }
.intro-copy { margin: 0; color: var(--muted); font-size: 15px; }
.search-row { display: flex; align-items: center; gap: 16px; margin-top: 28px; }
.search {
  display: flex;
  width: 100%;
  height: 46px;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #171c19;
  transition: border-color 160ms, box-shadow 160ms;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(183 227 106 / 12%); }
.search [data-lucide] { width: 17px; height: 17px; flex: 0 0 auto; color: var(--muted); stroke-width: 1.8; }
.search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.search input::placeholder { color: #778179; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
kbd {
  display: inline-flex;
  min-width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid #39433c;
  border-radius: 4px;
  background: #202722;
  color: #aab4ac;
  font-size: 12px;
}
.service-count { color: var(--faint); font: 10px Aldrich, monospace; letter-spacing: 1px; white-space: nowrap; }

/* Service cards */
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.service-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 176px;
  flex-direction: column;
  overflow: hidden;
  padding: 18px 19px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  transition: background 160ms, border-color 160ms, transform 160ms;
}
.service-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  content: "";
  transition: width 180ms;
}
.service-card:hover { transform: translateY(-2px); border-color: #46533f; background: var(--surface-hover); }
.service-card:hover::before, .service-card:focus-visible::before { width: 100%; }
.card-top, .card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-top { margin-bottom: 19px; }
.service-number { color: var(--faint); font: 10px Aldrich, monospace; letter-spacing: 1px; }
.card-arrow { color: #748078; line-height: 1; transition: color 160ms, transform 160ms; }
.card-arrow [data-lucide] { width: 18px; height: 18px; }
.service-card:hover .card-arrow, .service-card:focus-visible .card-arrow { transform: translate(2px, -2px); color: var(--accent); }
.service-main { display: flex; align-items: center; gap: 13px; }
.service-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid var(--icon-border, #354037);
  border-radius: 5px;
  background: var(--icon-background, #202822);
  color: var(--icon-color, var(--accent));
  transition: border-color 160ms, background 160ms;
}
.service-icon [data-lucide], .service-icon-image, .service-icon-svg { width: 21px; height: 21px; }
.service-icon [data-lucide] { stroke-width: 1.7; }
.service-icon-image { display: block; object-fit: contain; }
.service-icon-svg { display: block; fill: currentColor; }
.service-icon:empty { display: none; }
.hobbylos-icon { --icon-border: #535720; --icon-background: #292b18; --icon-color: var(--accent); }
.panel-icon { --icon-border: #353f52; --icon-background: #202631; --icon-color: #b6c7f0; }
.status-icon { --icon-border: #3b4b2e; --icon-background: #22291d; --icon-color: #b7e36a; }
.docker-icon { --icon-border: #30434a; --icon-background: #1d292e; --icon-color: #91c9e4; }
.project-icon { --icon-border: #49402e; --icon-background: #2a261f; --icon-color: #e0c48c; }
.fivem-icon { --icon-border: #493543; --icon-background: #2b2229; --icon-color: #d3a6c0; }
.service-card h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
.service-card h2.glitch {
  position: relative;
  display: inline-block;
  color: var(--text);
}
.service-card h2.glitch::before,
.service-card h2.glitch::after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  background: var(--surface);
  clip: rect(0, 0, 0, 0);
  content: attr(data-text);
  pointer-events: none;
}
.service-card:hover h2.glitch::before, .service-card:hover h2.glitch::after,
.service-card:focus-visible h2.glitch::before, .service-card:focus-visible h2.glitch::after { background: var(--surface-hover); }
.service-card h2.glitch::before {
  left: 1px;
  text-shadow: -1px 0 rgb(255 45 45 / 38%);
  animation: hobbylos-glitch-1 3s linear infinite alternate-reverse;
}
.service-card h2.glitch::after {
  left: -1px;
  text-shadow: -1px 0 rgb(76 125 255 / 42%);
  animation: hobbylos-glitch-2 3s linear infinite alternate-reverse;
}
@keyframes hobbylos-glitch-1 {
  0% { clip: rect(4px, 9999px, 8px, 0); }
  25% { clip: rect(10px, 9999px, 17px, 0); }
  50% { clip: rect(2px, 9999px, 11px, 0); }
  75% { clip: rect(13px, 9999px, 19px, 0); }
  100% { clip: rect(7px, 9999px, 15px, 0); }
}
@keyframes hobbylos-glitch-2 {
  0% { top: -1px; left: 1px; clip: rect(3px, 9999px, 12px, 0); }
  25% { top: -2px; left: 3px; clip: rect(11px, 9999px, 19px, 0); }
  50% { top: 1px; left: 2px; clip: rect(5px, 9999px, 14px, 0); }
  75% { top: 0; left: -3px; clip: rect(8px, 9999px, 18px, 0); }
  100% { top: -1px; left: -1px; clip: rect(2px, 9999px, 16px, 0); }
}
.service-card p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.card-bottom { margin-top: auto; padding-top: 19px; }
.domain { overflow: hidden; color: #7d8980; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.open-label { color: #7d8980; font: 9px Aldrich, monospace; letter-spacing: .7px; white-space: nowrap; transition: color 160ms; }
.service-card:hover .open-label { color: var(--accent); }

/* Empty search state and footer */
.no-results { display: flex; align-items: center; gap: 14px; padding: 26px 20px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.no-results-mark { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border: 1px solid #39433c; border-radius: 50%; color: var(--accent); font-family: Aldrich, monospace; }
.no-results strong { font-size: 13px; }
.no-results p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.no-results button { margin-left: auto; padding: 8px 11px; border: 1px solid #46533f; border-radius: 4px; background: transparent; color: var(--accent); cursor: pointer; font-size: 12px; }
.no-results button:hover { background: var(--accent-dark); }
.footer {
  display: flex;
  max-width: var(--content-width);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 70px auto 0;
  padding: 20px 24px 24px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font: 10px Aldrich, sans-serif;
  letter-spacing: .5px;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

@media (max-width: 900px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .topbar { height: 60px; padding: 0 18px; }
  .brand-name { font-size: 12px; }
  .main-link { min-height: 34px; gap: 7px; padding: 0 9px; font-size: 11px; }
  .container { padding: 0 18px; }
  .intro { padding: 48px 0 28px; }
  h1 { letter-spacing: -1.2px; }
  .intro-copy { max-width: 300px; font-size: 14px; }
  .search-row { align-items: flex-start; flex-direction: column; gap: 10px; margin-top: 23px; }
  .search { width: 100%; }
  .service-grid { grid-template-columns: 1fr; gap: 12px; }
  .service-card { min-height: 158px; }
  .footer { align-items: flex-start; flex-direction: column; gap: 6px; margin-top: 46px; padding: 18px; }
  .no-results { align-items: flex-start; flex-wrap: wrap; }
  .no-results button { margin-left: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .service-card h2.glitch::before, .service-card h2.glitch::after { animation: none; }
}
