/* ==========================================================================
   Spevo Blog — brand styling
   Palette and type mirror the other Spevo web surfaces:
   black background, white text, brand cyan #00B7CB, Inter.
   ========================================================================== */

:root {
  --bg: #000000;
  --fg: #ffffff;
  --accent: #00b7cb;
  --muted: rgba(255, 255, 255, 0.6);
  --faint: rgba(255, 255, 255, 0.38);
  --hairline: rgba(255, 255, 255, 0.1);
  --panel: rgba(255, 255, 255, 0.03);
  --panel-hover: rgba(255, 255, 255, 0.06);
  --accent-soft: rgba(0, 183, 203, 0.12);
  --accent-border: rgba(0, 183, 203, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(60% 34% at 50% 0%, rgba(0, 183, 203, 0.12), transparent 70%),
    var(--bg);
  color: var(--fg);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

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

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------- header -- */

.site-header {
  border-bottom: 1px solid var(--hairline);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  height: 34px;
  width: auto;
  display: block;
}
.brand-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 5px 12px;
  background: rgba(0, 183, 203, 0.06);
}

.site-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.site-nav a:hover {
  color: var(--fg);
  text-decoration: none;
}

/* ----------------------------------------------------------------- hero -- */

.hero {
  padding: 52px 0 8px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.hero p {
  margin-top: 12px;
  color: var(--muted);
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
}

/* -------------------------------------------------------------- toolbar -- */

.toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px 0 8px;
}

.search-form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto;
  width: 100%;
}
.search-form input {
  flex: 1;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  padding: 10px 18px;
  outline: none;
  transition: border-color 0.15s ease;
}
.search-form input::placeholder {
  color: var(--faint);
}
.search-form input:focus {
  border-color: var(--accent-border);
}
.search-form button {
  background: var(--accent);
  border: none;
  border-radius: 999px;
  color: #001b1f;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  cursor: pointer;
}
.search-form button:hover {
  filter: brightness(1.1);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.filter-row .filter-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-right: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--muted);
  background: var(--panel);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.chip:hover {
  color: var(--fg);
  border-color: var(--accent-border);
  text-decoration: none;
}
.chip.is-active {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}
.chip--small {
  padding: 3px 10px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border-color: var(--accent-border);
  background: rgba(0, 183, 203, 0.06);
}

.active-search {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.active-search a {
  margin-left: 8px;
}

/* ----------------------------------------------------------------- grid -- */

main {
  flex: 1;
  padding-bottom: 64px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  padding-top: 34px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  overflow: hidden;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.card:hover {
  text-decoration: none;
  border-color: var(--accent-border);
  background: var(--panel-hover);
  transform: translateY(-2px);
}

.card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #0a0a0a;
}
.card-cover--empty {
  display: grid;
  place-items: center;
  background:
    radial-gradient(70% 90% at 50% 100%, rgba(0, 183, 203, 0.14), transparent 70%),
    #050505;
}
.card-cover--empty img {
  width: 44%;
  opacity: 0.85;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 20px;
}
.card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.card-body h2 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.card-excerpt {
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  margin-top: auto;
  color: var(--faint);
  font-size: 12.5px;
}

/* ----------------------------------------------------------- pagination -- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding-top: 40px;
}
.pagination .page-info {
  color: var(--muted);
  font-size: 14px;
}
.page-link {
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 14px;
  color: var(--fg);
  background: var(--panel);
}
.page-link:hover {
  border-color: var(--accent-border);
  text-decoration: none;
}
.page-link.is-disabled {
  pointer-events: none;
  opacity: 0.35;
}

/* --------------------------------------------------------------- states -- */

.state {
  text-align: center;
  color: var(--muted);
  padding: 70px 20px;
  border: 1px dashed var(--hairline);
  border-radius: 16px;
  margin-top: 34px;
}
.state strong {
  display: block;
  color: var(--fg);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.loading {
  text-align: center;
  color: var(--faint);
  padding: 70px 20px;
}
.loading::after {
  content: "";
  display: block;
  width: 120px;
  height: 3px;
  margin: 18px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: shimmer 1.6s ease-in-out infinite;
  background-size: 200% 100%;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .loading::after { animation: none; }
  .card:hover { transform: none; }
}

/* ----------------------------------------------------------------- post -- */

.post {
  max-width: 760px;
  margin: 0 auto;
  padding-top: 44px;
}

.back-link {
  display: inline-block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 26px;
}
.back-link:hover {
  color: var(--fg);
  text-decoration: none;
}

.post-header .card-chips {
  margin-bottom: 14px;
}
.post-header h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.post-meta {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.post-cover {
  margin: 30px 0 8px;
}
.post-cover img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--hairline);
  display: block;
}
.post-cover figcaption {
  color: var(--faint);
  font-size: 13px;
  margin-top: 8px;
  text-align: center;
}

.post-content {
  padding-top: 22px;
  font-size: 1.02rem;
}
.post-content > * + * {
  margin-top: 1.1em;
}
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-top: 1.7em;
}
.post-content h1 { font-size: 1.7rem; }
.post-content h2 { font-size: 1.45rem; }
.post-content h3 { font-size: 1.2rem; }
.post-content p,
.post-content li {
  color: rgba(255, 255, 255, 0.86);
}
.post-content ul,
.post-content ol {
  padding-left: 1.4em;
}
.post-content li + li {
  margin-top: 0.4em;
}
.post-content blockquote {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px;
  color: var(--muted);
}
.post-content blockquote > * + * {
  margin-top: 0.7em;
}
.post-content code {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.15em 0.4em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}
.post-content pre {
  background: #0a0a0a;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 16px 18px;
  overflow-x: auto;
}
.post-content pre code {
  background: none;
  padding: 0;
  font-size: 0.88em;
}
.post-content img {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--hairline);
}
.post-content hr {
  border: none;
  border-top: 1px solid var(--hairline);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
}

/* ------------------------------------------------------------- comments -- */

.comments {
  max-width: 760px;
  margin: 46px auto 0;
}
.comments h2 {
  font-size: 1.25rem;
  margin-bottom: 18px;
}
.comment {
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--panel);
  padding: 14px 18px;
  margin-top: 12px;
}
.comment--reply {
  margin-left: clamp(16px, 5vw, 44px);
}
.comment-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
}
.comment-author {
  font-weight: 600;
  color: var(--fg);
}
.comment-date {
  color: var(--faint);
}
.comment-body {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14.5px;
  overflow-wrap: anywhere;
}
.comments-more {
  margin-top: 18px;
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  padding: 10px;
  cursor: pointer;
}
.comments-more:hover {
  border-color: var(--accent-border);
}
.comments-note {
  color: var(--faint);
  font-size: 13px;
  margin-top: 14px;
}

/* --------------------------------------------------------------- footer -- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 26px 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}
.site-footer a {
  color: var(--fg);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}
.site-footer a:hover {
  color: var(--accent);
  text-decoration: none;
}
