@import "./var.css";

:root {
  color-scheme: dark;
  --bg: var(--background-color);
  --bg-soft: rgba(15, 52, 96, 0.72);
  --panel: rgba(17, 25, 49, 0.82);
  --panel-border: rgba(22, 33, 62, 0.18);
  --text: var(--generic-text-color);
  --muted: var(--sidebar-text);
  --accent: var(--sidebar-text-highlight);
  --accent-strong: var(--sidebar-select);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Trebuchet MS", "Gill Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.24), transparent 28%),
    radial-gradient(circle at right center, rgba(14, 165, 233, 0.14), transparent 32%),
    linear-gradient(160deg, #050816 0%, #0b1020 52%, #08101d 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  filter: blur(18px);
  opacity: 0.6;
}

body::before {
  width: 22rem;
  height: 22rem;
  top: -6rem;
  left: -8rem;
  background: rgba(56, 189, 248, 0.16);
}

body::after {
  width: 18rem;
  height: 18rem;
  right: -4rem;
  bottom: 2rem;
  background: rgba(125, 211, 252, 0.12);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1.25rem;
}

.site-header,
.site-footer {
  backdrop-filter: blur(18px);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.header-brand-block{
  width: 100%;
  margin: 0 auto;
  max-width: 1200px;
  display: flex;
  /* align-items: center; */
  gap: 0.85rem;
  justify-content: space-between;
}

.site-header {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 3.75rem;
  height: 3.75rem;
  object-fit: cover;
  display: block;
}

.brand-text {
  display: grid;
  /* line-height: 3.05; */
  font-size: 2.25rem;
}

.brand-text strong {
  font-family: "Georgia", "Palatino Linotype", serif;
}

.brand-text small {
  color: var(--muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.site-nav a {
  border-radius: 999px;
  margin: auto;
  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.site-nav a {
  padding: 0.7rem 1rem;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-color: rgba(125, 211, 252, 0.4);
  background: rgba(125, 211, 252, 0.08);
}

.site-main {
  margin: 0 auto;
  max-width: 1200px;
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.site-nav a:hover {
  transform: translateY(-1px);
}

.site-footer {
  padding: 1.5rem 1.25rem;
  background: rgb(50, 54, 66);
}

.site-footer p {
  margin: 0;
}

.footer-brand-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.footer-content {
  margin: 0 auto;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-brand-block {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  max-width: 42rem;
}

.footer-brand-mark {
  width: 3rem;
  height: 3rem;
  border-radius: 0.95rem;
  object-fit: cover;
  display: block;
  flex: none;
}

.footer-brand-block strong {
  display: block;
  color: var(--text);
  font-family: "Georgia", "Palatino Linotype", serif;
  font-size: 1.05rem;
}

.footer-brand-block p,
.footer-note,
.footer-bottom p {
  color: var(--muted);
  line-height: 1.6;
}

.footer-note {
  max-width: 20rem;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.25rem 0;
}

.footer-links-grid section {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}

.footer-links-grid h2 {
  margin: 0 0 0.15rem;
  color: var(--text);
  font-size: 0.98rem;
}

.footer-links-grid a {
  color: var(--muted);
  text-decoration: none;
  width: fit-content;
  transition: color 160ms ease, transform 160ms ease;
}

.footer-links-grid a:hover {
  color: var(--text);
  transform: translateX(2px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 0.95rem;
}

.footer-release,
.footer-commit {
  text-align: right;
}

.footer-release span,
.footer-commit span {
  color: var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.button-primary {
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: #08101d;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.25);
}

.button-secondary {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.18);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.28);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 86%, white), color-mix(in srgb, var(--accent-strong) 92%, white));
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(125, 211, 252, 0.12);
  border-color: rgba(125, 211, 252, 0.35);
}

.button:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.85);
  outline-offset: 2px;
}

.button[aria-disabled="true"],
.button:disabled {
  opacity: 0.55;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 1rem, 1120px);
    gap: 0.9rem;
    padding-top: 0.5rem;
  }

  .site-header {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav {
    justify-content: space-between;
  }

  .site-nav a,
  .button {
    width: 100%;
  }

  .footer-brand-row,
  .footer-bottom {
    flex-direction: column;
  }

  .footer-brand-block {
    align-items: flex-start;
  }
}