:root {
  --bg-color: #0b0f16;
  --card-bg: rgba(18, 26, 38, 0.85);
  --text-main: #e7edf5;
  --text-muted: #a7b3c2;
  --accent: #6aa9ff;

  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  --radius: 16px;

  --container: 1040px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  padding: 28px 16px 48px;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(106, 169, 255, 0.22), transparent 55%),
    radial-gradient(900px 600px at 95% 10%, rgba(138, 92, 246, 0.12), transparent 50%),
    var(--bg-color);
}

header {
  max-width: 860px;
  margin: 0 auto 28px;
  text-align: center;
  padding: 10px 0;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.6rem);
  letter-spacing: -1px;
  line-height: 1.05;
}

header p {
  margin: 10px auto 0;
  max-width: 58ch;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.filter-btn {
  appearance: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--text-muted);
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  font-weight: 600;
  font-size: 0.9rem;
}

.filter-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(106, 169, 255, 0.35);
  color: var(--text-main);
  background: rgba(106, 169, 255, 0.08);
}

.filter-btn.active {
  background: rgba(106, 169, 255, 0.18);
  border-color: rgba(106, 169, 255, 0.55);
  color: var(--text-main);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.filter-btn:focus-visible {
  outline: 2px solid rgba(106, 169, 255, 0.75);
  outline-offset: 2px;
}

#content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  max-width: var(--container);
  margin: 0 auto;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 140px at 10% 0%, rgba(106,169,255,0.14), transparent 60%);
  opacity: 0.8;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(106, 169, 255, 0.55);
}

.card:active {
  transform: translateY(-3px);
}

.card-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: rgba(106, 169, 255, 0.95);
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.card-tag::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(106, 169, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(106, 169, 255, 0.14);
}

.card h2 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  line-height: 1.35;
  letter-spacing: -0.2px;
  position: relative;
  z-index: 1;
}

.card-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.card:hover .card-date {
  color: rgba(231, 237, 245, 0.86);
}

@media (max-width: 520px) {
  body { padding: 22px 12px 40px; }
  #content-grid { grid-template-columns: 1fr; }
  .card { padding: 16px; }
}
