:root {
  color-scheme: dark;
  --theme-card-gap: 14px;
  --theme-card-title-size: 1.15rem;
  --theme-card-excerpt-size: 0.87rem;
  --theme-card-image-height: 200px;
  --theme-server-padding: 8px 10px;
  --theme-menu-padding: 6px 11px;
  --theme-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body,
.gh-viewport {
  min-height: 100%;
}

html {
  background: var(--theme-bg);
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, color-mix(in srgb, var(--theme-accent) 14%, transparent), transparent 36%),
    linear-gradient(180deg, color-mix(in srgb, var(--theme-surface) 30%, var(--theme-bg)) 0%, var(--theme-bg) 34%);
  color: var(--theme-text);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.gh-viewport {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.gh-main {
  flex: 1 0 auto;
}

.gh-container {
  width: min(100% - 28px, var(--theme-container));
  margin: 0 auto;
}

.gh-top-bg-image {
  position: absolute;
  inset: 0 0 auto 0;
  height: clamp(260px, 36vw, 480px);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  opacity: 0.9;
  z-index: -1;
  pointer-events: none;
}

.gh-head {
  position: relative;
  padding: 18px 0 0;
}

.gh-top-section {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.gh-head-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
}

.gh-head-logo img {
  max-height: var(--theme-logo-height);
  width: auto;
}

.gh-head-logo span {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.gh-head-actions {
  justify-self: end;
}

.gh-top-server {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: min(100%, var(--theme-server-width));
  min-height: var(--theme-server-min-height);
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(7, 11, 19, 0.48);
  backdrop-filter: blur(10px);
  color: var(--theme-text);
  box-shadow: var(--theme-shadow);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.gh-top-server:hover {
  transform: translateY(-1px);
  border-color: rgba(138, 231, 41, 0.45);
}

.gh-top-server .icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 2px;
}

.gh-top-server-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.gh-top-server .ip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.1;
}

.gh-top-server .copy {
  width: 13px;
  height: 13px;
  opacity: 0.75;
}

.gh-top-server .online {
  font-size: 0.8rem;
  color: var(--theme-text-muted);
}

.copy-tooltip {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.2s ease;
  color: var(--theme-accent);
  font-size: 0.82rem;
}

.copy-tooltip.active {
  max-height: 24px;
  opacity: 1;
}

.gh-head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 0;
}

.gh-head-inner .gh-head-logo {
  flex: 0 0 auto;
}

.gh-head-menu {
  flex: 1 1 auto;
}

.gh-head-menu .nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gh-head-menu a {
  display: inline-flex;
  align-items: center;
  padding: var(--theme-menu-padding);
  border-radius: 999px;
  background: rgba(7, 11, 19, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--theme-text);
  font-weight: 600;
}

.gh-head-menu a:hover,
.gh-head-menu .nav-current a {
  border-color: rgba(138, 231, 41, 0.4);
  color: var(--theme-accent);
}

.gh-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: rgba(7, 11, 19, 0.46);
  color: var(--theme-text);
  cursor: pointer;
}

.gh-burger-box {
  position: relative;
  width: 18px;
  height: 14px;
}

.gh-burger-inner,
.gh-burger-inner::before,
.gh-burger-inner::after {
  position: absolute;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.gh-burger-inner {
  top: 6px;
}

.gh-burger-inner::before {
  top: -6px;
}

.gh-burger-inner::after {
  top: 6px;
}

.gh-page {
  padding: 18px 0 40px;
}

.gh-postfeed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: var(--theme-card-gap);
}

.gh-postfeed > *:first-child {
  grid-column: 1 / -1;
}

.gh-card-link,
.gh-article,
.gh-error-card {
  border-radius: var(--theme-radius);
}

.gh-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--theme-card-padding);
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.96), rgba(13, 17, 23, 0.92));
  border: 1px solid var(--theme-border);
  box-shadow: var(--theme-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.gh-card-link:hover {
  transform: translateY(-3px);
  border-color: rgba(138, 231, 41, 0.35);
}

.gh-card-picture {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: var(--theme-card-image-height);
  overflow: hidden;
  border-radius: calc(var(--theme-radius) - 4px);
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--theme-surface-alt), rgba(138, 231, 41, 0.18));
}

.gh-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gh-card-fallback {
  display: grid;
  place-items: center;
  padding: 24px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
}

.gh-card-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gh-card-title,
.gh-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.3vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.gh-card-title {
  font-size: var(--theme-card-title-size);
}

.gh-card-content p,
.gh-excerpt,
.gh-page-head p,
.gh-error-card p {
  margin: 0;
  color: var(--theme-text-muted);
  line-height: 1.7;
}

.gh-card-content p {
  font-size: var(--theme-card-excerpt-size);
}

.gh-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  color: var(--theme-text-muted);
  font-weight: 500;
}

.gh-card-author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.gh-card-author img,
.gh-author-image {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.gh-pagination-wrap {
  margin-top: 28px;
}

.gh-pagination-wrap .pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 18px 0 0;
  color: var(--theme-text-muted);
}

.gh-pagination-wrap .pagination a {
  color: var(--theme-text);
  font-weight: 600;
}

.gh-article {
  padding: 0 0 24px;
}

.gh-header {
  text-align: center;
  padding: 6px 0 20px;
}

.gh-post-meta,
.gh-archive-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--theme-accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
}

.gh-sep {
  opacity: 0.45;
}

.gh-feature-image {
  margin: 0 auto 20px;
}

.gh-feature-image img {
  width: 100%;
  border-radius: var(--theme-radius);
  border: 1px solid var(--theme-border);
}

.gh-canvas {
  max-width: 760px;
}

.gh-content {
  color: var(--theme-text);
  font-size: 0.98rem;
  line-height: 1.85;
}

.gh-content > * + * {
  margin-top: 1.1em;
}

.gh-content h1,
.gh-content h2,
.gh-content h3,
.gh-content h4,
.gh-content h5,
.gh-content h6 {
  margin: 1.8em 0 0.8em;
  line-height: 1.2;
}

.gh-content h2 {
  font-size: 1.8rem;
}

.gh-content h3 {
  font-size: 1.45rem;
}

.gh-content p,
.gh-content li,
.gh-content figcaption {
  color: var(--theme-text-muted);
}

.gh-content ul,
.gh-content ol {
  padding-left: 1.25rem;
}

.gh-content blockquote {
  margin: 1.5em 0;
  padding: 1.1em 1.2em;
  border-left: 4px solid var(--theme-accent);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0 var(--theme-radius) var(--theme-radius) 0;
}

.gh-content a {
  color: var(--theme-accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.gh-content img,
.gh-content iframe {
  max-width: 100%;
}

.gh-content .kg-width-wide,
.gh-content .kg-width-full {
  max-width: none;
  width: 100%;
}

.gh-content .kg-width-wide {
  grid-column: wide-start / wide-end;
}

.gh-content .kg-width-full {
  grid-column: full-start / full-end;
}

.gh-content .kg-card,
.gh-content .kg-image-card,
.gh-content .kg-gallery-card,
.gh-content .kg-bookmark-card,
.gh-content .kg-callout-card,
.gh-content .kg-product-card,
.gh-content .kg-embed-card {
  margin: 1.6em 0;
}

.gh-content .kg-bookmark-container,
.gh-content .kg-callout-card,
.gh-content .kg-header-card,
.gh-content .kg-toggle-card {
  border-radius: var(--theme-radius);
  border: 1px solid var(--theme-border);
}

.gh-content .kg-callout-card,
.gh-content .kg-header-card,
.gh-content .kg-toggle-content {
  background: rgba(255, 255, 255, 0.03);
}

.gh-content .kg-gallery-image img {
  width: 100%;
  border-radius: var(--theme-radius);
}

.gh-content pre,
.gh-content code {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.gh-content pre {
  overflow: auto;
  padding: 18px;
}

.gh-content code {
  padding: 0.14em 0.35em;
  font-size: 0.94em;
}

.gh-post-footer {
  padding: 6px 0 0;
}

.gh-post-authors {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.gh-author-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--theme-border);
  background: rgba(255, 255, 255, 0.03);
}

.gh-page-head {
  text-align: center;
  padding: 6px 0 22px;
}

.gh-error-page {
  padding: 48px 0;
}

.gh-error-card {
  width: min(100%, 700px);
  margin: 0 auto;
  padding: 28px;
  text-align: center;
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.96), rgba(13, 17, 23, 0.92));
  border: 1px solid var(--theme-border);
  box-shadow: var(--theme-shadow);
}

.gh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  margin-top: 18px;
  border-radius: 999px;
  background: var(--theme-accent);
  color: #07110d;
  font-weight: 700;
}

.gh-foot {
  padding: 8px 0 24px;
}

.gh-foot-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--theme-text-muted);
  font-size: 0.95rem;
}

.gh-foot-meta a {
  color: var(--theme-text);
}

@media (max-width: 900px) {
  .gh-top-section {
    justify-content: flex-start;
  }

  .gh-top-server {
    width: 100%;
    max-width: 360px;
  }

  .gh-head-inner {
    position: relative;
    flex-wrap: wrap;
    justify-content: space-between;
    padding-top: 14px;
  }

  .gh-head-inner .gh-head-logo {
    order: 1;
  }

  .gh-burger {
    order: 2;
  }

  .gh-head-menu {
    display: none;
    order: 3;
    width: 100%;
  }

  body.gh-head-open .gh-head-menu {
    display: block;
  }

  .gh-head-menu .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-bottom: 10px;
  }

  .gh-head-menu a {
    justify-content: center;
  }

  .gh-burger {
    display: inline-flex;
  }

  body.gh-head-open .gh-head-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .gh-head-logo {
    justify-content: flex-start;
  }

  .gh-head-logo img {
    max-height: 34px;
  }

  .gh-postfeed {
    grid-template-columns: 1fr;
  }

  .gh-postfeed > *:first-child {
    grid-column: auto;
  }

  .gh-card-link {
    padding: 14px;
  }

  .gh-card-meta,
  .gh-foot-meta,
  .gh-pagination-wrap .pagination {
    flex-direction: column;
    align-items: flex-start;
  }

  .gh-card-title {
    font-size: 1.08rem;
  }

  .gh-card-content p {
    font-size: 0.84rem;
  }

  .gh-card-picture {
    margin-bottom: 12px;
  }

  .gh-pagination-wrap .pagination {
    gap: 10px;
  }
}

@media (max-width: 560px) {
  .gh-container {
    width: min(100% - 18px, var(--theme-container));
  }

  .gh-head {
    padding-top: 14px;
  }

  .gh-top-server {
    max-width: 100%;
    border-radius: 18px;
    padding: 10px 12px;
  }

  .gh-top-server .ip {
    font-size: 0.9rem;
    flex-wrap: wrap;
  }

  .gh-top-server .online {
    font-size: 0.76rem;
  }

  .gh-head-inner {
    padding-top: 12px;
  }

  .gh-head-menu .nav {
    gap: 8px;
  }

  .gh-head-menu a {
    width: 100%;
    justify-content: center;
    padding: 9px 12px;
  }

  .gh-burger {
    width: 44px;
    height: 44px;
  }

  .gh-page {
    padding: 14px 0 30px;
  }

  .gh-postfeed {
    gap: 12px;
  }

  .gh-card-link {
    padding: 12px;
  }

  .gh-card-picture {
    border-radius: 14px;
    max-height: 180px;
  }

  .gh-card-title {
    font-size: 1rem;
  }

  .gh-card-content p,
  .gh-content {
    font-size: 0.84rem;
  }

  .gh-article {
    padding-bottom: 16px;
  }

  .gh-header {
    padding-bottom: 14px;
  }

  .gh-feature-image {
    margin-bottom: 16px;
  }

  .gh-error-card {
    padding: 22px;
  }

  .gh-foot-meta {
    padding-top: 18px;
  }
}
