:root {
  color-scheme: light;
  --bg: #f7f4ed;
  --surface: #ffffff;
  --surface-strong: #22252a;
  --text: #232323;
  --muted: #62676f;
  --line: #ded8cf;
  --accent: #177e89;
  --accent-strong: #0d5962;
  --gold: #c47f2b;
  --rose: #b84a62;
  --shadow: 0 18px 48px rgba(35, 35, 35, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.skip-link {
  position: absolute;
  left: 18px;
  top: 12px;
  z-index: 20;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--surface-strong);
  color: #fff;
  padding: 10px 12px;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid rgba(35, 35, 35, 0.08);
  background: rgba(247, 244, 237, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-strong);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.nav a {
  border-radius: 8px;
  padding: 9px 12px;
}

.nav a:hover {
  background: rgba(23, 126, 137, 0.1);
  color: var(--accent-strong);
}

main {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

.blog-home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.38fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: center;
  padding: 44px 0 26px;
}

.blog-heading {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.8rem, 8vw, 5.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.blog-heading > p:not(.eyebrow) {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.home-search {
  display: grid;
  gap: 8px;
  max-width: 520px;
  margin-top: 22px;
}

.home-search label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.home-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font: inherit;
}

.search-box {
  display: flex;
  gap: 8px;
}

.search-box input {
  min-width: 0;
}

.search-box button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.search-box button:hover,
.post-card:focus-visible {
  border-color: var(--accent);
}

.post-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(23, 126, 137, 0.22);
}

.result-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.64);
}

.post-stats {
  display: grid;
  gap: 10px;
}

.post-stats div,
.post-stats a {
  min-height: 80px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  padding: 14px;
}

.post-stats strong {
  display: block;
  font-size: 1.65rem;
  line-height: 1;
}

.post-stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.post-stats a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: var(--surface-strong);
  color: #fff;
  font-weight: 800;
}

.section-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 22px;
  border-top: 1px solid var(--line);
}

#posts,
#about {
  scroll-margin-top: 96px;
}

.section-bar h2,
.about h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.toolbar input {
  width: min(280px, 52vw);
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  font: inherit;
}

.layout {
  display: grid;
  padding-bottom: 56px;
}

.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.post-card {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(35, 35, 35, 0.08);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(35, 35, 35, 0.06);
}

.post-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(35, 35, 35, 0.1);
}

.post-card img {
  width: 100%;
  max-height: 220px;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.post-card-body {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.latest-badge {
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(23, 126, 137, 0.12);
  color: var(--accent-strong);
  font-weight: 800;
}

.post-card h3 {
  margin: 0;
  font-size: clamp(1.18rem, 2.4vw, 1.55rem);
  line-height: 1.28;
}

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

.empty-state {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 34px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  text-align: center;
}

.about {
  border-top: 1px solid var(--line);
  padding: 54px 0 76px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  max-width: 900px;
  margin-top: 22px;
  color: var(--muted);
  line-height: 1.8;
}

.about-grid p {
  margin: 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 22px 0 38px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer span:last-child {
  display: flex;
  gap: 12px;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .blog-home {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 34px;
  }

  h1 {
    max-width: 9ch;
  }

  .section-bar,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .section-bar {
    display: grid;
  }

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

@media (max-width: 520px) {
  main,
  .footer {
    width: min(100% - 28px, 1160px);
  }

  .brand small {
    display: none;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .toolbar {
    display: grid;
    align-items: stretch;
  }

  .toolbar input {
    width: 100%;
  }

  .search-box {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .post-card:hover {
    transform: none;
  }
}
