:root {
  --bg: #060606;
  --fg: #ffffff;
  --accent: #53c3cf;
  --muted: #b7c5c8;
  --border: rgba(83, 195, 207, 0.35);
  --panel: linear-gradient(180deg, rgba(83, 195, 207, 0.06), rgba(83, 195, 207, 0.02));
  --maxw: 960px;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top, rgba(83, 195, 207, 0.08), transparent 0 28%),
    linear-gradient(180deg, #050505 0%, #060606 100%);
  color: var(--fg);
  font-family: "Outfit", system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.back-link:hover,
.back-link:focus-visible {
  background: rgba(83, 195, 207, 0.1);
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding: 12px 0 10px;
  text-align: center;
}

header img {
  width: auto;
  height: 70px;
}

header h1 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
}

header p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  max-width: 640px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 320px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(83, 195, 207, 0.06);
}

.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(83, 195, 207, 0.12);
}

.search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--fg);
  font-size: 15px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.post-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.post-card:hover,
.post-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(83, 195, 207, 0.55);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.28);
}

.thumb {
  width: 100%;
  aspect-ratio: 20 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 22px;
}

.post-kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.post-body h2 {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 20px;
  line-height: 1.2;
  min-height: 72px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-body p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.excerpt-group {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  min-height: 156px;
}

.meta {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 4px 10px;
  border: 1px solid rgba(83, 195, 207, 0.2);
  border-radius: 999px;
  background: rgba(83, 195, 207, 0.06);
  color: var(--muted);
  font-size: 13px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 8px 18px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--accent);
  color: var(--bg);
}

.hidden {
  display: none;
}

.no-results {
  margin-top: 30px;
  color: var(--muted);
  text-align: center;
}

footer {
  margin-top: 48px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 640px) {
  .wrap {
    padding: 24px 16px 64px;
  }

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

  .post-body {
    padding: 18px;
  }

  .post-body h2 {
    min-height: 0;
  }

  .excerpt-group {
    min-height: 0;
  }

  .btn {
    margin-bottom: 0;
  }
}
