:root {
  color-scheme: dark;
  --page: #0b1018;
  --panel: #121a27;
  --panel-hover: #151f2e;
  --line: #263348;
  --text: #f2f5fa;
  --muted: #b2bdd0;
  --subtle: #98a8c0;
  --accent: #70efdd;
  --accent-strong: #a0f9e7;
  --radius: 15px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-synthesis: none;
  background: var(--page);
  color: var(--text);
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; line-height: 1.55; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
[hidden] { display: none !important; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus { position: fixed; z-index: 5; left: 1rem; top: 1rem; background: var(--page); padding: .6rem 1rem; }
.wrap { width: min(100% - 64px, 1240px); margin-inline: auto; }

.site-header { border-bottom: 1px solid #202b3c; background: #0c121c; }
.header-inner { display: flex; justify-content: space-between; align-items: center; min-height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; text-decoration: none; letter-spacing: -.025em; }
.brand strong { font-weight: 700; }
.brand-mark { display: flex; gap: 3px; transform: rotate(-12deg); }
.brand-mark i { position: relative; width: 10px; height: 20px; border: 1.5px solid var(--accent); border-radius: 6px 2px 2px 6px; }
.brand-mark i + i { border-radius: 2px 6px 6px 2px; background: var(--accent); }
.brand-mark i::after { content: ''; position: absolute; border-radius: 50%; width: 3px; height: 3px; background: var(--accent); top: 5px; left: 2px; }
.brand-mark i + i::after { background: #0b1820; top: 9px; }
.site-header nav { display: flex; gap: 26px; align-items: center; }
.site-header nav a, .nav-button { text-decoration: none; background: none; border: 0; padding: .55rem 0; color: var(--muted); font-size: .9375rem; white-space: nowrap; }
.site-header nav a:hover, .nav-button:hover { color: var(--accent-strong); }

.hero {
  position: relative;
  display: grid;
  isolation: isolate;
  align-items: center;
  min-height: 340px;
  margin-top: 32px;
  overflow: hidden;
  background: radial-gradient(ellipse at 74% 64%, #172c4d, transparent 67%), #101827;
  border: 1px solid #29394f;
  border-radius: 21px;
}
.hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #101827 24%, #101827f5 34%, #101827aa 46%, #10182705 74%), linear-gradient(0deg, #0e162547, transparent 43%);
  pointer-events: none;
}
.hero-art { position: absolute; z-index: -2; top: 0; right: 0; width: 76%; height: 100%; object-fit: cover; object-position: center 55%; }
.hero-content { padding: 43px clamp(24px, 4.5vw, 60px) 45px; }
.hero h1 { margin: 0; color: #f7f9ff; font-size: clamp(2.8rem, 5.1vw, 5rem); font-weight: 750; line-height: 1.02; letter-spacing: -.065em; }
.hero h1 span { color: var(--accent-strong); }
.hero p { margin: 20px 0 23px; max-width: 43ch; color: #c5d0e4; font-size: clamp(1rem, 1.4vw, 1.125rem); line-height: 1.55; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .875rem; color: #acbcd5; }
.update-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 13px #70efdd56; margin-right: 4px; }

.catalog { margin: 39px 0 60px; scroll-margin-top: 22px; }
.catalog h2 { margin: 0 0 17px; font-size: clamp(1.65rem, 2.6vw, 2.15rem); line-height: 1.14; letter-spacing: -.04em; }
.text-button { padding: .35rem 0; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); background: none; border: 0; font-size: .9rem; white-space: nowrap; }
.text-button:hover { color: var(--accent-strong); }
.filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(155px, .28fr) minmax(176px, .32fr); gap: 11px; }
.search-field, .select-field { position: relative; min-width: 0; }
.search-field input, .select-field select { width: 100%; min-height: 50px; color: var(--text); background: #111a27; border: 1px solid #2a384d; border-radius: 11px; transition: border-color .15s, background .15s; }
.search-field input:hover, .select-field select:hover { border-color: #4d617c; }
.search-field input:focus, .select-field select:focus { border-color: #62baa7; }
.search-field input { padding: 0 41px; }
.search-field input::placeholder { color: #9daec7; }
.search-field input::-webkit-search-cancel-button { appearance: none; }
.search-icon { position: absolute; top: 17px; left: 16px; width: 13px; height: 13px; border: 1.7px solid #a5b5cb; border-radius: 50%; pointer-events: none; }
.search-icon::after { content: ''; position: absolute; right: -4px; bottom: -3px; width: 5px; height: 1.7px; background: #a5b5cb; transform: rotate(47deg); }
.clear-search { position: absolute; right: 10px; top: 8px; width: 33px; height: 33px; color: var(--muted); border: 0; border-radius: 6px; background: transparent; font-size: 1.4rem; line-height: 1; }
.clear-search:hover { background: #24354b; color: var(--text); }
.select-field select { appearance: none; padding: 0 35px 0 14px; text-overflow: ellipsis; }
.select-field::after { content: ''; position: absolute; right: 16px; top: 19px; width: 8px; height: 8px; border-right: 1.5px solid #a5b5cb; border-bottom: 1.5px solid #a5b5cb; transform: rotate(45deg); pointer-events: none; }
.categories { display: flex; flex-wrap: wrap; gap: 8px; margin: 17px 0 0; }
.category-button { display: flex; gap: 8px; align-items: center; padding: .47rem .78rem; background: #101824; color: var(--muted); border: 1px solid #29384c; border-radius: 8px; font-size: .9rem; white-space: nowrap; }
.category-button:hover { color: var(--text); border-color: #5a718a; }
.category-button[aria-pressed='true'] { color: #a9fae8; background: #16322f; border-color: #3e7c70; }
.results-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 43px; margin: 13px 0 4px; }
.results-toolbar p { margin: 0; font-size: .9rem; color: var(--subtle); }
.results-toolbar .text-button { color: var(--accent-strong); }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.project-card { display: flex; flex-direction: column; min-width: 0; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .17s, background-color .17s; }
.project-card:hover { border-color: #425877; background: var(--panel-hover); }
.card-meta, .dialog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; }
.card-meta { justify-content: space-between; min-height: 31px; }
.category-label { display: inline-flex; align-items: center; gap: 7px; color: #b0c9e5; font-size: .875rem; line-height: 1.3; }
.category-label::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: #82bdf8; flex: 0 0 8px; }
.category-ports::before { background: #bba4ff; }
.category-media::before { background: #eeaaab; }
.category-utilities::before { background: #e0bd77; }
.category-development::before { background: #95accc; }
.status-chip { display: inline-block; line-height: 1.25; padding: .3rem .55rem; border: 1px solid transparent; border-radius: 7px; font-size: .875rem; overflow-wrap: anywhere; }
.status-public { color: #a5f3dc; border-color: #2b5a51; background: #18372f; }
.status-early { color: #f5d899; border-color: #685532; background: #3c301d; }
.status-experimental { color: #e0cbff; border-color: #5c477a; background: #342746; }
.status-demo { color: #b8dbff; border-color: #3c5f80; background: #1c3149; }
.status-reference { color: #c0cbe0; border-color: #46546b; background: #253145; }
.project-card h3 { margin: 13px 0 5px; font-size: 1.36rem; line-height: 1.16; letter-spacing: -.025em; overflow-wrap: anywhere; }
.project-card h3 button { border: 0; background: none; color: inherit; padding: 0; font: inherit; text-align: left; }
.project-card h3 button:hover { color: var(--accent-strong); }
.platform-line { margin: 0; font-size: .875rem; color: #9fb6d7; line-height: 1.45; }
.card-description { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 4; margin: 10px 0 15px; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.card-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; margin-top: auto; padding-top: 13px; border-top: 1px solid #26364c; }
.card-actions a { display: inline-flex; align-items: center; color: var(--accent-strong); font-size: .9rem; text-decoration-color: #57958d; text-underline-offset: 3px; }
.card-actions a:hover { text-decoration-color: currentColor; }
.card-actions .text-button { margin-left: auto; padding: .25rem 0; }
.more-controls { display: flex; justify-content: center; margin-top: 24px; }
.outline-button { background: #14232d; color: #b5f9ec; border: 1px solid #355e62; border-radius: 9px; padding: .7rem 1.05rem; }
.outline-button:hover { background: #18383c; border-color: #579a8e; }
.empty-state { padding: 3rem clamp(1rem, 4vw, 2rem); text-align: center; background: #111a27; border: 1px solid var(--line); border-radius: var(--radius); }
.empty-state h3 { margin: 0; font-size: 1.25rem; }
.empty-state p { color: var(--muted); margin: .5rem 0 1.1rem; }

.site-footer { border-top: 1px solid #212d3e; color: var(--subtle); font-size: .875rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; padding: 20px 0 25px; }
.footer-inner p { margin: 0; }
.footer-inner span { color: #8da1bd; }

dialog { width: min(100% - 32px, 630px); max-height: min(740px, 100% - 32px); padding: 0; color: var(--text); background: #121c2a; border: 1px solid #405877; border-radius: 15px; box-shadow: 0 18px 95px #0008; }
dialog::backdrop { background: #05080ed1; backdrop-filter: blur(4px); }
.dialog-inner { position: relative; padding: 28px clamp(18px, 5vw, 34px); }
.dialog-close { position: absolute; top: 13px; right: 13px; display: grid; place-items: center; width: 39px; height: 39px; background: #1b2a3e; border: 1px solid #344a64; border-radius: 9px; color: var(--text); font-size: 1.5rem; line-height: 1; }
.dialog-close:hover { background: #2a4059; }
.dialog-meta { padding-right: 36px; margin-bottom: 12px; }
dialog h2 { margin: 0; padding-right: 38px; font-size: clamp(1.55rem, 4vw, 2rem); line-height: 1.18; letter-spacing: -.045em; overflow-wrap: anywhere; }
.dialog-platforms { color: #a9c5e4; margin: .55rem 0 0; }
.dialog-description { color: #c4cfe0; margin: 1rem 0 1.4rem; }
dialog h3 { margin: 0 0 .55rem; font-size: 1rem; }
.source-list { list-style: none; margin: 0; padding: 0; }
.source-list li + li { margin-top: 6px; }
.source-list a { display: block; color: var(--accent-strong); padding: .6rem .8rem; text-underline-offset: 3px; background: #172939; border-radius: 7px; overflow-wrap: anywhere; }
.source-list a:hover { background: #203849; }
.status-definitions { margin: 18px 0 0; }
.status-definitions div { display: grid; grid-template-columns: minmax(0, 180px) 1fr; align-items: start; gap: 7px 14px; padding: .55rem 0; }
.status-definitions dd, .performance-note { color: var(--muted); margin: 0; }
.performance-note { border-top: 1px solid #2d4158; margin-top: 15px; padding-top: 13px; }

@media (max-width: 960px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-art { width: 82%; object-position: 58% 55%; }
  .hero::after { background: linear-gradient(90deg, #101827 18%, #101827f0 28%, #101827a3 47%, #10182708 85%); }
}
@media (max-width: 660px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { min-height: 59px; }
  .site-header nav { gap: 14px; }
  .site-header nav a, .nav-button { font-size: .875rem; }
  .hero { align-items: end; margin-top: 18px; min-height: 365px; border-radius: 16px; }
  .hero-art { width: 100%; height: 65%; top: -15px; object-position: 61% 50%; }
  .hero::after { background: linear-gradient(0deg, #101827 36%, #101827cf 49%, #10182728 74%, #10182716 100%); }
  .hero-content { padding: 126px 20px 22px; }
  .hero h1 { font-size: clamp(2.15rem, 8.25vw, 3.35rem); }
  .hero p { margin: 13px 0 15px; }
  .catalog { margin-top: 29px; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .search-field { grid-column: 1 / -1; }
  .search-field input, .select-field select { min-height: 46px; }
  .search-icon { top: 15px; }
  .clear-search { top: 6px; }
  .select-field::after { top: 17px; }
  .categories { margin-top: 13px; }
  .project-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .project-card { padding: 16px; }
}
@media (max-width: 380px) {
  .wrap { width: calc(100% - 24px); }
  .brand { gap: 8px; font-size: .9rem; }
  .site-header nav { gap: 10px; }
  .site-header nav a { display: none; }
  .hero-art { height: 56%; top: 0; object-position: 69% 42%; }
  .status-definitions div { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
