/*
Theme Name: OSS Hosting
Theme URI: https://example.com/oss-hosting
Author: Codex
Description: A lightweight, SEO-friendly WordPress theme for open source hosting and developer infrastructure brands.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oss-hosting
Tags: custom-logo, one-column, two-columns, featured-images, blog, translation-ready
*/

:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --panel: #ffffff;
  --panel-border: #d0d7de;
  --text: #24292f;
  --muted: #57606a;
  --brand: #0969da;
  --brand-2: #0969da;
  --accent: #2da44e;
  --shadow: 0 1px 3px rgba(31, 35, 40, 0.08);
  --radius: 14px;
  --max: 1120px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  background: #fff;
  color: #000;
  padding: 0.75rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
}

.site-shell {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--panel-border);
}

.site-header__inner,
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
}

.site-header__inner {
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  min-width: 0;
}

.brand__mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.7rem;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(9, 105, 218, 0.14), rgba(45, 164, 78, 0.12)),
    #ffffff;
  border: 1px solid var(--panel-border);
  box-shadow: none;
}

.brand__mark svg {
  width: 1.1rem;
  height: 1.1rem;
}

.brand__text {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.brand__name {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  font-size: 0.98rem;
}

.brand__tagline {
  color: var(--muted);
  font-size: 0.8rem;
}

.search-form--header {
  flex: 1 1 22rem;
  max-width: 28rem;
}

.search-field--header {
  min-height: 2.2rem;
  padding-inline: 0.75rem;
  border-radius: 0.5rem;
  background: #ffffff;
  border: 1px solid var(--panel-border);
  color: var(--text);
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.header-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  padding: 0.2rem 0.1rem;
  font-size: 0.9rem;
}

.header-link:hover {
  color: var(--brand-2);
}

.nav-toggle {
  display: none;
}

nav.site-nav {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.55rem;
  border-radius: 0.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
  color: var(--text);
  background: var(--bg-soft);
}

.button,
.wp-block-button__link,
.site-nav .menu-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--panel-border);
  background: #f6f8fa;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: none;
}

.button:hover,
.wp-block-button__link:hover,
.site-nav .menu-cta a:hover {
  transform: translateY(-1px);
  color: var(--text);
  background: #eef2f6;
}

.button--ghost {
  background: #ffffff;
  border-color: var(--panel-border);
}

.button--primary {
  background: #2da44e;
  border-color: #2da44e;
  color: #fff;
}

.button--primary:hover {
  background: #2c974b;
}

.hero {
  position: relative;
  padding: 1.5rem 0 1.5rem;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(35px);
  opacity: 0.8;
}

.hero::before {
  width: 20rem;
  height: 20rem;
  left: -8rem;
  top: 0.5rem;
  background: rgba(9, 105, 218, 0.08);
}

.hero::after {
  width: 24rem;
  height: 24rem;
  right: -10rem;
  top: 2rem;
  background: rgba(45, 164, 78, 0.08);
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1.25rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: #f6f8fa;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero h1 {
  margin: 0.8rem 0 0.6rem;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: -0.06em;
  max-width: 14ch;
}

.hero p {
  margin: 0;
  font-size: 0.95rem;
  max-width: 62ch;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.hero__aside {
  display: grid;
  gap: 0.75rem;
}

.hero--repo {
  padding-bottom: 1.8rem;
}

.hero__grid--repo {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
}

.repo-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.repo-stat {
  padding: 0.65rem 0.75rem;
}

.repo-stat strong {
  display: block;
  font-size: 1rem;
  line-height: 1.1;
}

.repo-stat span {
  color: var(--muted);
  font-size: 0.8rem;
}

.repo-panel {
  padding: 0.85rem;
}

.repo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.repo-path {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace;
  font-size: 0.85rem;
}

.repo-path__owner,
.repo-path__repo {
  color: var(--text);
}

.repo-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  color: var(--text);
  background: #eef2f6;
  border: 1px solid var(--panel-border);
}

.repo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--panel-border);
}

.repo-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.55rem;
  border-radius: 0.5rem;
  color: var(--muted);
  background: #f6f8fa;
  border: 1px solid transparent;
  font-size: 0.85rem;
}

.repo-tab--active {
  color: var(--text);
  border-color: var(--panel-border);
  background: #ffffff;
}

.code-card--repo {
  margin-top: 0;
}

.repo-activity {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.repo-activity__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--panel-border);
}

.repo-activity__row strong {
  display: block;
  margin-bottom: 0.15rem;
}

.repo-activity__row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.repo-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  margin-top: 0.35rem;
}

.repo-dot--green {
  background: #3fb950;
}

.repo-dot--blue {
  background: #58a6ff;
}

.glass-card {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 0.9rem;
}

.metric-grid,
.feature-grid,
.process-grid,
.post-grid {
  display: grid;
  gap: 0.75rem;
}

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

.metric {
  padding: 0.75rem;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--panel-border);
}

.metric strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.metric span {
  color: var(--muted);
  font-size: 0.82rem;
}

.code-card {
  padding: 0.75rem;
  margin-top: 0.75rem;
  background: #f6f8fa;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  overflow: hidden;
}

.code-card pre {
  margin: 0;
  overflow: auto;
  color: var(--text);
  font-size: 0.82rem;
}

.section {
  padding: 0.75rem 0 2rem;
}

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.section__head h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section__head p {
  margin: 0;
  max-width: 55ch;
  color: var(--muted);
  font-size: 0.9rem;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid--repos {
  align-items: stretch;
}

.card {
  padding: 0.85rem;
}

.card h3,
.post-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.card p,
.post-card p {
  margin: 0;
  color: var(--muted);
}

.cta-banner {
  display: grid;
  gap: 0.75rem;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.cta-banner h2 {
  margin: 0 0 0.35rem;
}

.cta-banner p {
  margin: 0;
  font-size: 0.9rem;
}

.cta-banner--repo {
  padding: 1.4rem;
}

.card__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  display: grid;
  place-items: center;
  margin-bottom: 0.75rem;
  background: #f6f8fa;
  border: 1px solid var(--panel-border);
}

.process-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.process-grid--repo {
  align-items: stretch;
}

.process-step {
  padding: 0.85rem;
  position: relative;
}

.process-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
  background: #f6f8fa;
  border: 1px solid var(--panel-border);
  color: var(--brand);
  font-weight: 800;
  font-size: 0.85rem;
}

.post-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-grid--spaced {
  margin-top: 1rem;
}

.post-grid--activity {
  align-items: stretch;
}

.post-card {
  overflow: hidden;
}

.post-card__body {
  padding: 0.85rem;
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.45rem;
}

.post-card__thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(9, 105, 218, 0.06), rgba(45, 164, 78, 0.08));
  overflow: hidden;
}

.post-card__thumb--spaced {
  margin: 0.75rem 0 0.9rem;
}

.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-content {
  padding-bottom: 2.5rem;
}

.entry,
.page-card,
.not-found-card,
.search-card,
.comments-area,
.site-footer__inner {
  width: min(100%, var(--max));
}

.entry,
.page-card,
.not-found-card,
.search-card,
.comments-area {
  margin-inline: auto;
}

.entry,
.page-card,
.not-found-card,
.search-card {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: clamp(0.95rem, 2vw, 1.4rem);
}

.entry h1,
.page-card h1,
.not-found-card h1,
.search-card h1 {
  margin-top: 0;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.entry-content > * + *,
.page-card > * + *,
.not-found-card > * + *,
.search-card > * + * {
  margin-top: 0.85rem;
}

.pagination-wrap {
  margin-top: 1rem;
}

.wp-block-image img,
.alignwide,
.alignfull {
  border-radius: 12px;
}

.site-footer {
  border-top: 1px solid var(--panel-border);
  background: #ffffff;
}

.site-footer__meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.site-footer__links .menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__links .menu li {
  margin: 0;
}

.site-footer__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.site-footer__links a:hover {
  color: var(--text);
}

.wp-caption,
.gallery-caption,
.sticky,
.has-drop-cap:not(:focus)::first-letter {
  color: inherit;
}

.search-form {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.search-form label {
  flex: 1 1 16rem;
}

.search-form .search-field {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--panel-border);
  background: #ffffff;
  color: var(--text);
  font-size: 0.9rem;
}

.search-form .search-submit {
  min-height: 2.5rem;
  padding-inline: 0.95rem;
  border: 1px solid var(--panel-border);
  border-radius: 0.5rem;
  background: #f6f8fa;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
}

@media (max-width: 960px) {
  .hero__grid,
  .feature-grid,
  .process-grid,
  .post-grid {
    grid-template-columns: 1fr;
  }

  .hero__grid--repo,
  .repo-stats,
  .cta-banner {
    grid-template-columns: 1fr;
  }

  .section__head,
  .site-header__inner,
  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header__inner {
    align-items: stretch;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .search-form--header,
  .site-actions {
    width: 100%;
    max-width: none;
  }

  .search-form--header {
    max-width: none;
  }

  .site-nav ul {
    flex-wrap: wrap;
  }

  .repo-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .hero {
    padding-top: 1.25rem;
  }

  .hero h1 {
    max-width: 10ch;
  }

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

  .site-header__inner {
    position: relative;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }

  .brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand__tagline {
    display: none;
  }

  .search-form--header,
  .site-actions,
  nav.site-nav {
    display: none;
  }

  .nav-toggle.site-nav {
    display: block;
    width: auto;
    margin-left: auto;
  }

  .nav-toggle.site-nav summary {
    display: inline-flex;
    padding: 0.35rem 0.55rem;
    font-size: 0.85rem;
  }

  .nav-toggle.site-nav summary {
    list-style: none;
  }

  .nav-toggle.site-nav summary::-webkit-details-marker {
    display: none;
  }

  .nav-toggle.site-nav .menu {
    padding: 0.45rem 0 0.25rem;
  }

  .nav-toggle.site-nav ul {
    display: grid;
    gap: 0.25rem;
  }

  .nav-toggle.site-nav a {
    width: 100%;
    justify-content: flex-start;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
  }

  .repo-stats {
    gap: 0.6rem;
  }

  .hero__actions,
  .cta-banner {
    gap: 0.5rem;
  }
}
