:root{
  --bg: #0c0f14;
  --bg2: #0f1218;
  --text: #eef1ff;
  --muted: rgba(238,241,255,0.72);
  --border: rgba(255,255,255,0.12);
  --shadow: 0 18px 60px rgba(0,0,0,0.50);
  --accent: #a98cff;
  --accent2: #6ea8ff;
  --neon: rgba(169,140,255,0.55);
  --neonSoft: rgba(169,140,255,0.18);
  --radius: 18px;
  --container: 1560px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --glass: rgba(14,18,26,0.62);
  --glassSoft: rgba(14,18,26,0.52);
  --glassHover: rgba(18,24,36,0.64);
  --glassSoftHover: rgba(18,24,36,0.56);
}

html{
  height: 100%;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body{
  min-height: 100%;
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
}

*{ box-sizing: border-box; }

a{ color: inherit; text-decoration: none; }
.hidden{ display: none !important; }

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(14px, 2.2vw, 44px);
}

@keyframes bgFloat{
  0%{ transform: translate3d(0,0,0) scale(1); }
  50%{ transform: translate3d(0,-6px,0) scale(1.015); }
  100%{ transform: translate3d(0,0,0) scale(1); }
}
@keyframes gridDrift{
  0%{ transform: translate3d(0,0,0); opacity:.20; }
  50%{ transform: translate3d(8px,5px,0); opacity:.16; }
  100%{ transform: translate3d(0,0,0); opacity:.20; }
}
@keyframes glowPulse{
  0%{ opacity:.14; transform: scale(1); }
  50%{ opacity:.22; transform: scale(1.05); }
  100%{ opacity:.14; transform: scale(1); }
}
@keyframes pop{
  0%{ transform: translateY(10px); opacity:0; }
  100%{ transform: translateY(0); opacity:1; }
}

.bg{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(1100px 650px at 10% -15%, rgba(169,140,255,0.24), transparent 62%),
    radial-gradient(900px 520px at 95% 10%, rgba(110,168,255,0.18), transparent 58%),
    radial-gradient(900px 600px at 60% 115%, rgba(255,255,255,0.05), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,0.06), transparent 24%),
    linear-gradient(135deg, rgba(169,140,255,0.10), rgba(140,140,150,0.06) 55%, rgba(255,255,255,0.02)),
    var(--bg);
  animation: bgFloat 16s ease-in-out infinite;
}

.bg__grid{
  position: absolute;
  inset: 0;
  opacity: .20;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(60% 60% at 50% 18%, black 0%, transparent 70%);
  animation: gridDrift 20s ease-in-out infinite;
}

.bg__glow{
  position: absolute;
  width: 780px;
  height: 780px;
  border-radius: 50%;
  filter: blur(52px);
  opacity: .18;
  animation: glowPulse 8.5s ease-in-out infinite;
}
.bg__glow--a{ left: -260px; top: 120px; background: rgba(169,140,255,0.45); }
.bg__glow--b{ right: -280px; top: -110px; background: rgba(110,168,255,0.40); animation-delay: 1.2s; }

.bg__edu{
  position: absolute;
  font-weight: 950;
  opacity: .14;
  text-shadow: 0 14px 40px rgba(0,0,0,0.32);
  user-select: none;
}
.bg__edu--2{ left: 74%; top: 28%; font-size: 42px; }
.bg__edu--3{ left: 86%; top: 62%; font-size: 38px; }
.bg__edu--6{ left: 8%; top: 48%; font-size: 36px; }

.header{
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--border);
  background-color: rgba(12,15,20,0.62);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transform: translateZ(0);
}

.header__row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}

.brand{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  transition: transform .18s ease;
}
.brand:hover{ transform: translateY(-1px); }

.brand__avatar{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background-color: rgba(255,255,255,0.06);
  box-shadow: 0 14px 50px rgba(169,140,255,0.10);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.brand:hover .brand__avatar{
  transform: rotate(-2deg) scale(1.03);
  border-color: rgba(169,140,255,0.45);
  box-shadow: 0 18px 60px rgba(169,140,255,0.16);
}

.brand__stack{ display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand__name{
  font-weight: 950;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand__sub{
  color: var(--muted);
  font-weight: 850;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: rgba(255,255,255,0.03);
}

.nav__link{
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 950;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.nav__link:hover{
  color: var(--text);
  background-color: rgba(255,255,255,0.04);
  transform: translateY(-1px);
}
.nav__link.is-active{
  color: var(--text);
  background: linear-gradient(135deg, rgba(169,140,255,0.16), rgba(110,168,255,0.10));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 0 0 1px rgba(169,140,255,0.18) inset;
}

.burger{
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background-color: rgba(255,255,255,0.03);
  cursor: pointer;
  padding: 10px;
  transition: transform .18s ease, background .18s ease;
}
.burger:hover{ transform: translateY(-1px); background-color: rgba(255,255,255,0.05); }
.burger span{
  display: block;
  height: 2px;
  background: rgba(238,241,255,0.85);
  border-radius: 999px;
}
.burger span + span{ margin-top: 6px; }

.mobile{
  display: none;
  border-top: 1px solid var(--border);
  padding: 10px 18px 16px;
  background-color: rgba(12,15,20,0.62);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transform: translateZ(0);
}
.mobile.is-open{ display: block; animation: pop .22s ease both; }

.mobile__link{
  display: block;
  padding: 12px 12px;
  border-radius: 14px;
  color: var(--muted);
  font-weight: 950;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.mobile__link:hover{ color: var(--text); background-color: rgba(255,255,255,0.05); transform: translateY(-1px); }
.mobile__link.is-active{ color: var(--text); background-color: rgba(255,255,255,0.04); }

.glass{
  position: relative;
  background-color: var(--glass);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  transform: translateZ(0);
}

.glass:hover{
  background-color: var(--glassHover);
  border-color: rgba(255,255,255,0.18);
  transform: translateZ(0) translateY(-1px);
}

.glass--soft{
  background-color: var(--glassSoft);
  border: 1px solid rgba(255,255,255,0.12);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.glass--soft:hover{
  background-color: var(--glassSoftHover);
}

.glass--hero{
  padding: 18px;
  margin-top: 18px;
}

.glass--fab{
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.50);
}

.hero{
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  align-items: end;
}

.hero__title{
  margin: 0;
  font-size: clamp(34px, 3.2vw, 48px);
  letter-spacing: -0.8px;
}

.hero__sub{
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 75ch;
  font-weight: 850;
}

.search{ padding: 14px; }
.search__row{ display: flex; gap: 10px; align-items: center; }
.search__meta{
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 850;
}

.input, .select{
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  border: 1px solid rgba(255,255,255,0.12);
  background-color: rgba(18,22,32,0.56);
  color: var(--text);
  border-radius: 16px;
  padding: 12px 14px;
  outline: none;
  font-weight: 900;
  transition: box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.input::placeholder{
  color: rgba(238,241,255,0.56);
  opacity: 1;
}

.input[type="search"]::-webkit-search-cancel-button,
.input[type="search"]::-webkit-search-decoration{
  -webkit-appearance: none;
}

.input:focus, .select:focus{
  border-color: rgba(169,140,255,0.62);
  box-shadow: 0 0 0 4px rgba(169,140,255,0.14);
}

.input:hover, .select:hover{ background-color: rgba(18,22,32,0.70); }

.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus{
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0px 1000px rgba(18,22,32,0.70) inset;
  transition: background-color 999999s ease-in-out 0s;
  border: 1px solid rgba(255,255,255,0.12);
}

.btn{
  border: 0;
  cursor: pointer;
  border-radius: 16px;
  padding: 12px 14px;
  font-weight: 950;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: transform .16s ease, filter .16s ease, background .16s ease, box-shadow .16s ease;
}
.btn:active{ transform: translateY(1px) scale(.99); }

.btn--primary{
  color: #0b0f16;
  background: linear-gradient(135deg, rgba(169,140,255,0.98), rgba(110,168,255,0.92));
  box-shadow: 0 12px 40px rgba(169,140,255,0.14);
}
.btn--primary:hover{ filter: brightness(1.05); transform: translateY(-1px); }

.btn--ghost{
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.12);
  background-color: rgba(255,255,255,0.03);
}
.btn--ghost:hover{ background-color: rgba(255,255,255,0.06); transform: translateY(-1px); }

.toolbar{
  margin: 16px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.chips{ display: flex; gap: 10px; flex-wrap: wrap; }
.chip{
  border: 1px solid rgba(255,255,255,0.12);
  background-color: rgba(14,18,26,0.50);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 950;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.chip:hover{
  color: var(--text);
  transform: translateY(-1px);
  background-color: rgba(18,24,36,0.58);
  box-shadow: 0 0 0 1px rgba(169,140,255,0.14) inset;
}
.chip.is-active{
  color: var(--text);
  background: linear-gradient(135deg, rgba(169,140,255,0.16), rgba(110,168,255,0.10));
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 0 0 1px rgba(169,140,255,0.18) inset, 0 14px 50px rgba(169,140,255,0.10);
}

.sort{ display: flex; gap: 10px; align-items: center; }
.sort__label{ color: var(--muted); font-weight: 950; font-size: 14px; }

.grid{
  margin: 18px 0 40px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.card{
  grid-column: span 6;
  position: relative;
  overflow: hidden;
}

.card__inner{
  position: relative;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 190px;
  background-color: var(--glassSoft);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  transform: translateZ(0);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.card__inner::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background:
    radial-gradient(700px 300px at 18% 0%, rgba(169,140,255,0.10), transparent 60%),
    radial-gradient(700px 300px at 88% 0%, rgba(110,168,255,0.08), transparent 60%);
  pointer-events: none;
}

.card__inner:hover{
  background-color: var(--glassSoftHover);
  border-color: rgba(169,140,255,0.46);
  transform: translateZ(0) translateY(-2px);
  box-shadow:
    0 18px 60px rgba(0,0,0,0.52),
    0 0 0 1px rgba(169,140,255,0.22) inset,
    0 0 24px rgba(169,140,255,0.18),
    0 0 60px rgba(169,140,255,0.10);
}

.card__title{
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.2px;
  line-height: 1.22;
}

.card__excerpt{
  margin: 0;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 850;
}

.card__bottom{
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pill{
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background-color: rgba(18,22,32,0.50);
  color: rgba(238,241,255,0.88);
  font-weight: 950;
  font-size: 12px;
}

.tags{ display: flex; gap: 8px; flex-wrap: wrap; }
.tag{
  font-size: 12px;
  font-weight: 950;
  color: rgba(238,241,255,0.88);
  border: 1px solid rgba(255,255,255,0.12);
  background-color: rgba(18,22,32,0.36);
  padding: 7px 10px;
  border-radius: 999px;
}

.empty{
  padding: 24px;
  text-align: center;
}

.empty__title{ font-weight: 950; font-size: 18px; }
.empty__text{ margin-top: 6px; color: var(--muted); font-weight: 850; }

.breadcrumbs{
  padding: 18px 0 0;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
}

.breadcrumbs__link{ color: var(--muted); font-weight: 950; transition: transform .16s ease, color .16s ease; }
.breadcrumbs__link:hover{ color: var(--text); transform: translateY(-1px); }
.breadcrumbs__current{ color: var(--text); font-weight: 950; }

.article{
  margin: 14px 0 40px;
  padding: 22px;
  background-color: var(--glassSoft);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  transform: translateZ(0);
}

.article__title{
  margin: 0;
  font-size: clamp(26px, 2.2vw, 36px);
  letter-spacing: -0.6px;
}

.article__meta{
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.article__actions{ margin-top: 18px; }

.prose{
  margin-top: 18px;
  color: rgba(238,241,255,0.92);
  font-size: 16px;
  line-height: 1.85;
  font-weight: 850;
}
.prose p{ margin: 0 0 12px; color: rgba(238,241,255,0.90); }
.prose h2{ margin: 18px 0 10px; font-size: 22px; letter-spacing: -0.2px; }
.prose ul{ margin: 0 0 12px; padding-left: 18px; }
.prose a{ color: var(--accent2); font-weight: 950; }

.page{
  margin-top: 18px;
  padding: 22px;
  margin-bottom: 40px;
  background-color: var(--glassSoft);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  transform: translateZ(0);
}

.page__title{ margin: 0; font-size: clamp(28px, 2.4vw, 38px); letter-spacing: -0.6px; }
.page__sub{ margin: 10px 0 0; color: var(--muted); font-weight: 850; }

.cards{ margin-top: 18px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.cards .card{ grid-column: span 6; }

.card__label{ color: var(--muted); font-weight: 950; font-size: 13px; }
.card__value{ display: inline-block; margin-top: 8px; font-weight: 950; color: var(--text); }

.footer{
  border-top: 1px solid rgba(255,255,255,0.10);
  background-color: rgba(12,15,20,0.42);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  padding: 26px 0 18px;
  transform: translateZ(0);
}

.footer__grid{
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 18px;
}

.footer__title{ font-weight: 950; margin-bottom: 10px; }
.footer__text{ color: var(--muted); font-weight: 850; max-width: 60ch; }

.footer__link{
  display: block;
  color: var(--muted);
  padding: 6px 0;
  font-weight: 850;
  transition: transform .16s ease, color .16s ease;
}
.footer__link:hover{ color: var(--text); transform: translateY(-1px); }

.footer__bottom{
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.fab{
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 80;
}

.fab__btn{
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.14);
  background-color: var(--glass);
  cursor: pointer;
  padding: 0;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
  border-radius: 18px;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transform: translateZ(0);
}

.fab__btn:hover{
  transform: translateZ(0) translateY(-2px) scale(1.02);
  background-color: var(--glassHover);
  border-color: rgba(169,140,255,0.34);
  box-shadow: 0 18px 60px rgba(0,0,0,0.50), 0 0 28px rgba(169,140,255,0.14);
}

.fab__icon{ font-weight: 950; font-size: 18px; }

.fab__btn--tg{
  background: linear-gradient(135deg, rgba(34,158,217,0.18), rgba(169,140,255,0.12));
}

.fab__btn--tg:hover{
  background: linear-gradient(135deg, rgba(34,158,217,0.26), rgba(169,140,255,0.16));
}

.fab__tg{
  width: 22px;
  height: 22px;
  fill: rgba(238,241,255,0.96);
  filter: drop-shadow(0 10px 22px rgba(0,0,0,0.30));
}

.reveal{
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s ease, transform .45s ease;
}

.reveal.is-in{
  opacity: 1;
  transform: translateY(0);
}

.scrollbar{
  position: fixed;
  left: 0;
  top: 0;
  height: 3px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, rgba(169,140,255,0.85), rgba(110,168,255,0.70));
  opacity: .75;
  z-index: 90;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))){
  .glass, .glass--soft, .header, .footer, .mobile, .card__inner, .article, .page, .fab__btn{
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .glass{ background-color: rgba(18,22,32,0.80); }
  .glass--soft{ background-color: rgba(18,22,32,0.74); }
  .card__inner{ background-color: rgba(18,22,32,0.74); }
}

@media (prefers-reduced-motion: reduce){
  .bg, .bg__grid, .bg__glow{ animation: none !important; }
  .reveal{ transition: none !important; opacity: 1 !important; transform: none !important; }
}

@media (max-width: 900px){
  .nav{ display: none; }
  .burger{ display: block; }
  .hero{ grid-template-columns: 1fr; }
  .grid .card{ grid-column: span 12; }
  .cards .card{ grid-column: span 12; }
  .footer__grid{ grid-template-columns: 1fr; }
}
