:root {
  color-scheme: dark;
  --background: #050b12;
  --surface: #0c1724;
  --surface-raised: #101f30;
  --border: rgba(155, 178, 200, 0.16);
  --text: #dfeeff;
  --muted: #9bb2c8;
  --heading: #edf8ff;
  --blue: #1aa3ff;
  --cyan: #12d7ff;
  --cyan-strong: #0ea5e9;
  --radius: 12px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
  font-family: "Inter", sans-serif;
  background: var(--background);
  color: var(--text);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 68% 12%, rgba(26, 163, 255, 0.105), transparent 34rem),
    radial-gradient(ellipse at 8% 52%, rgba(18, 215, 255, 0.035), transparent 26rem),
    var(--background);
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.site-header,
main,
.site-footer {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(155, 178, 200, 0.1);
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: var(--heading);
  font-family: "Outfit", sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.brand-highlight {
  color: var(--cyan);
}

.brand-mark {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(18, 215, 255, 0.38);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(18, 215, 255, 0.14), rgba(26, 163, 255, 0.07));
}

.brand-mark svg {
  width: 24px;
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-width: 1.5;
}

.header-note {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.78rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #40d6a0;
  box-shadow: 0 0 12px rgba(64, 214, 160, 0.6);
}

.hero {
  min-height: 316px;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(155, 178, 200, 0.11);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
  padding: 48px 0 58px;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--cyan);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow-line {
  width: 22px;
  height: 1px;
  background: var(--cyan);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  color: var(--heading);
  font-family: "Outfit", sans-serif;
  font-size: clamp(2.9rem, 6vw, 4.55rem);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.99;
}

h1 span {
  color: var(--cyan);
}

.hero-description {
  max-width: 425px;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.hero-orbit {
  width: 360px;
  height: 300px;
  position: absolute;
  top: 50%;
  right: 2%;
  transform: translateY(-50%);
  opacity: 0.87;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(26, 163, 255, 0.23);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-24deg);
}

.orbit-one {
  width: 180px;
  height: 270px;
}

.orbit-two {
  width: 260px;
  height: 220px;
  transform: translate(-50%, -50%) rotate(42deg);
}

.orbit-three {
  width: 320px;
  height: 122px;
  border-color: rgba(18, 215, 255, 0.25);
  transform: translate(-50%, -50%) rotate(-16deg);
}

.orbit-core {
  width: 102px;
  height: 102px;
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(18, 215, 255, 0.5);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 163, 255, 0.28), rgba(7, 26, 45, 0.4) 68%);
  box-shadow: 0 0 60px rgba(26, 163, 255, 0.16), inset 0 0 30px rgba(18, 215, 255, 0.08);
  transform: translate(-50%, -50%);
}

.orbit-core span {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(18, 215, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(18, 215, 255, 0.65);
}

.orbit-node {
  width: 8px;
  height: 8px;
  position: absolute;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(18, 215, 255, 0.9);
}

.node-one { top: 16%; left: 53%; }
.node-two { top: 56%; left: 10%; background: var(--blue); }
.node-three { right: 9%; bottom: 23%; width: 6px; height: 6px; }

.resources-section {
  min-height: 370px;
  padding: 45px 0 56px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading .eyebrow {
  margin-bottom: 7px;
}

.section-heading h2,
.dialog-heading h2 {
  margin-bottom: 0;
  color: var(--heading);
  font-family: "Outfit", sans-serif;
  font-size: 1.7rem;
  letter-spacing: -0.04em;
}

#resource-count {
  margin-left: 5px;
  color: #7692aa;
  font-family: "Inter", sans-serif;
  font-size: 0.83rem;
  font-weight: 500;
  vertical-align: 0.14em;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 600;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:focus-visible,
.icon-button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.button-primary {
  color: #04111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 8px 24px rgba(18, 215, 255, 0.13);
}

.button-primary:hover {
  background: linear-gradient(135deg, #6ceaff, #4db7ff);
}

.button svg,
.search-box svg,
.filter-box svg,
.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.toolbar {
  display: flex;
  gap: 12px;
  margin: 0 0 21px;
}

.search-box,
.filter-box {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(12, 23, 36, 0.78);
  color: #7790a7;
}

.search-box {
  width: min(390px, 100%);
}

.search-box input,
.filter-box select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 0.82rem;
}

.search-box input::placeholder,
.field-label + input::placeholder,
.field-row input::placeholder {
  color: #6f879c;
}

.filter-box {
  width: 184px;
}

.filter-box select {
  appearance: none;
  cursor: pointer;
}

.filter-box option {
  color: var(--text);
  background: var(--surface);
}

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

.resource-card {
  min-height: 182px;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 19px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(16, 31, 48, 0.93), rgba(9, 20, 32, 0.95));
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.resource-card:hover {
  transform: translateY(-3px);
  border-color: rgba(18, 215, 255, 0.36);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.36), 0 0 22px rgba(18, 215, 255, 0.05);
}

.resource-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.resource-mark {
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(26, 163, 255, 0.25);
  border-radius: 10px;
  color: var(--cyan);
  background: rgba(26, 163, 255, 0.09);
  font-family: "Outfit", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.card-actions {
  display: flex;
  gap: 4px;
  margin: -5px -5px 0 0;
}

.icon-button {
  width: 31px;
  height: 31px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #7993a9;
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--border);
  background: rgba(155, 178, 200, 0.07);
  color: var(--heading);
}

.icon-button svg {
  width: 16px;
  height: 16px;
}

.icon-button.danger:hover {
  color: #ff8585;
}

.resource-title {
  margin: 15px 0 5px;
  color: var(--heading);
  font-family: "Outfit", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.resource-description {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.55;
}

.resource-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.category-tag {
  max-width: 64%;
  overflow: hidden;
  padding: 5px 9px;
  border: 1px solid rgba(18, 215, 255, 0.12);
  border-radius: 99px;
  color: #a4d5e5;
  background: rgba(18, 215, 255, 0.06);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.open-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
}

.open-link:hover {
  color: #75eaff;
}

.open-link svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.empty-state {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  border: 1px dashed rgba(155, 178, 200, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(12, 23, 36, 0.65), rgba(7, 16, 26, 0.45));
  text-align: center;
}

.empty-icon {
  width: 53px;
  height: 53px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
  border: 1px solid rgba(18, 215, 255, 0.2);
  border-radius: 16px;
  background: rgba(18, 215, 255, 0.07);
}

.empty-icon svg {
  width: 31px;
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.empty-state h3 {
  margin-bottom: 7px;
  color: var(--heading);
  font-family: "Outfit", sans-serif;
  font-size: 1.22rem;
  letter-spacing: -0.025em;
}

.empty-state p,
.no-results {
  max-width: 420px;
  margin: 0 0 19px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.button-secondary {
  min-height: 39px;
  border-color: rgba(18, 215, 255, 0.28);
  color: var(--cyan);
  background: rgba(18, 215, 255, 0.07);
}

.button-secondary:hover {
  border-color: rgba(18, 215, 255, 0.58);
  background: rgba(18, 215, 255, 0.12);
}

.no-results {
  max-width: none;
  padding: 27px 0;
  text-align: center;
}

.status-message {
  min-height: 1.4rem;
  margin: 14px 0 0;
  color: #ff9696;
  font-size: 0.8rem;
}

.site-footer {
  min-height: 67px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(155, 178, 200, 0.1);
  color: #71879b;
  font-size: 0.7rem;
}

.footer-divider {
  padding: 0 4px;
  color: var(--cyan);
}

.resource-dialog {
  width: min(560px, calc(100% - 32px));
  max-width: none;
  padding: 26px;
  border: 1px solid rgba(155, 178, 200, 0.2);
  border-radius: 16px;
  color: var(--text);
  background: linear-gradient(150deg, #101f30, #08131e);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
}

.resource-dialog::backdrop {
  background: rgba(3, 10, 16, 0.78);
  backdrop-filter: blur(4px);
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 23px;
}

.dialog-heading .eyebrow {
  margin-bottom: 6px;
}

.dialog-heading h2 {
  font-size: 1.55rem;
}

.resource-dialog form > input,
.field-row input {
  width: 100%;
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid rgba(155, 178, 200, 0.18);
  border-radius: 7px;
  color: var(--text);
  background: rgba(5, 11, 18, 0.58);
  font-size: 0.82rem;
}

.resource-dialog form > input:focus,
.field-row input:focus {
  border-color: rgba(18, 215, 255, 0.65);
  outline: none;
}

.field-label {
  display: block;
  margin: 16px 0 7px;
  color: #c9dbea;
  font-size: 0.75rem;
  font-weight: 600;
}

.field-label span {
  color: var(--cyan);
}

.field-hint {
  margin: 6px 0 0;
  color: #7890a5;
  font-size: 0.67rem;
}

.field-row {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 13px;
}

.field-row .field-label {
  margin-top: 16px;
}

.form-error {
  margin: 13px 0 0;
  color: #ff9696;
  font-size: 0.77rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
}

.button-quiet {
  border-color: rgba(155, 178, 200, 0.17);
  color: #a8bbca;
  background: transparent;
}

.button-quiet:hover {
  border-color: rgba(155, 178, 200, 0.35);
  background: rgba(155, 178, 200, 0.06);
}

.visually-hidden {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .hero-orbit {
    right: -120px;
    opacity: 0.43;
  }

  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .site-header,
  main,
  .site-footer {
    width: calc(100% - 32px);
  }

  .site-header {
    min-height: 68px;
  }

  .header-note {
    font-size: 0.68rem;
  }

  .hero {
    min-height: 285px;
  }

  .hero-copy {
    padding: 42px 0;
  }

  h1 {
    font-size: 3.2rem;
  }

  .hero-description {
    max-width: 320px;
    font-size: 0.88rem;
  }

  .hero-orbit {
    right: -196px;
    opacity: 0.27;
  }

  .resources-section {
    padding: 34px 0 42px;
  }

  .section-heading {
    align-items: center;
    margin-bottom: 18px;
  }

  .section-heading h2 {
    font-size: 1.45rem;
  }

  .section-heading > .button {
    min-height: 39px;
    gap: 6px;
    padding: 0 11px;
    font-size: 0.72rem;
  }

  .toolbar {
    flex-direction: column;
  }

  .search-box,
  .filter-box {
    width: 100%;
  }

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

  .resource-card {
    min-height: 168px;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .resource-dialog {
    padding: 21px 18px;
  }

  .site-footer {
    min-height: 70px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
