:root {
  color-scheme: dark;
  --bg: #060816;
  --text: rgba(255, 255, 255, 0.95);
  --muted: rgba(255, 255, 255, 0.6);
  --card-border: rgba(255, 255, 255, 0.1);
  --card-bg: rgba(255, 255, 255, 0.055);
  --card-bg-hover: rgba(255, 255, 255, 0.08);
  --cyan: #8be7ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  position: relative;
}

.bg-layer,
.grid-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-layer {
  background:
    radial-gradient(circle at 20% 15%, rgba(87, 120, 255, 0.18), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(49, 201, 255, 0.14), transparent 24%),
    radial-gradient(circle at 50% 80%, rgba(156, 89, 255, 0.12), transparent 26%);
}

.grid-layer {
  opacity: 0.07;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 72px 72px;
}

.page-wrap {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  width: min(1240px, 94vw);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0 3.5rem;
}

.page-header {
  margin-bottom: 3.2rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.brand-left,
.brand-right {
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.brand-left {
  font-size: clamp(1.8rem, 4vw, 3.8rem);
  font-weight: 600;
}

.brand-right {
  font-size: clamp(1.6rem, 3.6vw, 3.4rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
  text-align: right;
}

.cards {
  display: grid;
  gap: 1.2rem;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 30px;
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  transition: transform 0.28s ease, border-color 0.28s ease, background-color 0.28s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--card-bg-hover);
}

.card-edge {
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(139, 231, 255, 0.65), transparent);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.card:hover .card-edge {
  opacity: 1;
}

.card-layout {
  display: grid;
  gap: 1.25rem;
  padding: 1.4rem;
}

.card-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.08em;
  color: rgba(255, 255, 255, 0.28);
}

.card-content {
  display: flex;
  min-height: 176px;
  flex-direction: column;
}

.card h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.05em;
}

.card h2 a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.25s ease;
}

.card h2 a:hover {
  text-decoration-color: rgba(139, 231, 255, 0.7);
}

.title-arrow {
  font-size: 0.8em;
  margin-left: 0.35rem;
  color: rgba(255, 255, 255, 0.45);
}

.card p {
  margin: 0;
  max-width: 70ch;
  font-size: clamp(0.95rem, 2vw, 0.98rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.68);
}

.links {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 0.55rem;
  padding-top: 1.2rem;
  flex-wrap: wrap;
}

.links a {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.links a:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 231, 255, 0.5);
  background: rgba(139, 231, 255, 0.1);
}

.links img {
  width: 18px;
  height: 18px;
  opacity: 0.75;
}

.page-footer {
  margin-top: 2.8rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.9rem;
  display: flex;
  gap: 0.6rem;
  flex-direction: column;
}

.page-footer a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-footer a:hover {
  color: #fff;
}

.markdown-body {
  min-height: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  margin-top: 0.65rem;
  margin-bottom: 0.65rem;
}

.markdown-body p,
.markdown-body li {
  color: rgba(255, 255, 255, 0.72);
}

.markdown-body a {
  color: var(--cyan);
}

.markdown-body code {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
}

@media (min-width: 768px) {
  .page-wrap {
    padding-inline: 0.35rem;
  }

  .card-layout {
    grid-template-columns: 84px minmax(0, 1fr);
    align-items: start;
    padding: 1.55rem 1.6rem;
  }

  .page-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
