:root {
  --bg: #0f172a;
  --bg-secondary: #111827;
  --surface: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #38bdf8;
  --accent-hover: #0ea5e9;
  --border: #334155;
  --shadow: 0 12px 24px rgba(2, 6, 23, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-secondary) 100%);
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  width: min(1120px, 94%);
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  gap: 20px;
}

.brand {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  font-weight: 600;
}

.nav a.active,
.nav a:hover {
  color: var(--text);
}

.hero {
  padding: 42px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 30px;
  align-items: center;
}

.hero-grid-3col {
  grid-template-columns: 220px minmax(420px, 640px) 220px;
  justify-content: center;
}

.hero-content {
  width: 100%;
  text-align: center;
}

.hero-content .actions {
  justify-content: center;
}

.home-page,
.home-page p,
.home-page h2,
.home-page li {
  text-align: center;
}

.home-page .list {
  list-style-position: inside;
  padding-left: 0;
}

.home-page .section .container {
  max-width: 860px;
}

.home-page .section p,
.home-page .section li {
  font-size: 1.14rem;
  line-height: 1.65;
}

.home-page .hero-content p {
  font-size: 1.18rem;
  line-height: 1.55;
}

.avatar {
  width: 220px;
  height: 220px;
  border-radius: 18px;
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
}

h1,
h2,
h3 {
  margin-top: 0;
  margin-bottom: 12px;
  line-height: 1.25;
}

h1 {
  font-size: clamp(1.8rem, 4.4vw, 2.6rem);
}

p {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--text);
}

.muted {
  color: var(--muted);
}

.section {
  padding: 28px 0;
}

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

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

.contacts-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: calc((100% - 48px) / 4);
}

.contact-card h3 {
  margin: 0;
}

.contact-card .actions {
  margin-top: 0;
  flex-wrap: nowrap;
}

.contact-card .btn {
  white-space: nowrap;
}

.projects-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.projects-cards .card {
  width: min(330px, 100%);
}

.projects-links {
  text-align: center;
}

.card {
  background: rgba(31, 41, 55, 0.75);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.project-card-title {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  text-align: center;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}

.project-card-description {
  min-height: 88px;
  margin-bottom: 0;
}

.project-card-bottom {
  margin-top: auto;
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  color: #cbd5e1;
  min-height: 64px;
}

.channels-avatar {
  width: 86px;
  height: 86px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--accent);
  padding: 9px 14px;
  font-weight: 600;
  color: #06263a;
  background: var(--accent);
}

.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #032133;
}

.btn.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.list {
  margin: 0;
  padding-left: 18px;
}

.list li {
  margin-bottom: 8px;
}

.project-page {
  padding: 36px 0 48px;
}

.project-meta {
  margin-top: 14px;
  color: var(--muted);
}

.gh-mini,
.gh-details {
  margin-top: 12px;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.gh-mini span,
.gh-details span {
  display: inline-block;
  margin-right: 12px;
  margin-bottom: 6px;
}

.gh-error {
  color: #fca5a5;
}

.gh-block-title {
  display: block;
  margin-top: 10px;
  margin-bottom: 2px;
  font-weight: 700;
  color: var(--text);
}

.gh-list {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.gh-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.35);
}

.gh-item summary {
  cursor: pointer;
}

.gh-pre {
  margin: 8px 0 4px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  color: #cbd5e1;
}

.gh-commit-info {
  margin-top: 4px;
}

.gh-overview {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.gh-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 10px;
  align-items: start;
}

.gh-label {
  color: var(--muted);
}

.gh-value {
  color: var(--text);
}

.gh-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.gh-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
}

.gh-stat-icon {
  line-height: 1;
}

.gh-stat-text {
  color: #cbd5e1;
}

.gh-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.gh-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 0.85rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.support-strip {
  margin-top: 34px;
}

.support-strip-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(31, 41, 55, 0.55);
}

.support-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.support-btn {
  padding: 6px 10px;
  font-size: 0.88rem;
}

.footer-inner {
  padding: 18px 0 30px;
  color: var(--muted);
  font-size: 0.93rem;
}

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

  .channels-cards {
    grid-template-columns: 1fr;
  }

  .contacts-cards {
    justify-content: center;
  }

  .contact-card {
    width: 100%;
    justify-content: space-between;
  }

  .projects-cards {
    width: 100%;
    justify-content: center;
  }

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

  .hero-grid-3col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "main-avatar channel-avatar"
      "content content";
    justify-items: center;
    gap: 14px;
  }

  .hero-main-avatar {
    grid-area: main-avatar;
  }

  .hero-channel-avatar {
    grid-area: channel-avatar;
  }

  .hero-content {
    grid-area: content;
  }

  .hero-main-avatar,
  .hero-channel-avatar {
    width: min(42vw, 170px);
    height: min(42vw, 170px);
  }

  .avatar {
    width: 170px;
    height: 170px;
  }

  .gh-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .gh-stats {
    gap: 6px;
  }

  .support-strip-inner {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 1100px) and (min-width: 761px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-cards {
    justify-content: center;
  }

  .contacts-cards {
    justify-content: center;
  }

  .contact-card {
    width: calc((100% - 16px) / 2);
  }
}
