:root {
  --bg: #f5f2ed;
  --surface: rgba(255, 255, 255, 0.68);
  --stroke: rgba(62, 39, 35, 0.14);
  --shadow: rgba(62, 39, 35, 0.08);
  --text: #3e2723;
  --muted: #4a5565;
  --brand: #874f37;
  --brand-2: #6b3e2e;
  --container: 1040px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(900px 600px at 18% -10%, rgba(135, 79, 55, 0.12), transparent 55%),
    radial-gradient(800px 600px at 90% 10%, rgba(196, 165, 123, 0.18), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Noto Sans",
    sans-serif;
  line-height: 1.65;
}

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

.container {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(245, 242, 237, 0.86);
  border-bottom: 1px solid rgba(62, 39, 35, 0.1);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 8px 20px var(--shadow);
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name strong {
  font-size: 14px;
  letter-spacing: 0.2px;
}

.brand-name span {
  font-size: 12px;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.nav-links a {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.5);
  color: var(--text);
}

main {
  padding: 36px 0 24px;
}

.post-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}

.post {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 28px;
  box-shadow: 0 18px 44px var(--shadow);
  overflow: hidden;
}

.post-hero {
  padding: 28px 28px 22px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(135, 79, 55, 0.12);
  border: 1px solid rgba(62, 39, 35, 0.12);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

h1 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.dek {
  margin: 16px 0 0;
  max-width: 68ch;
  color: var(--muted);
  font-size: 16px;
}

.cover {
  margin: 0 18px 8px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(62, 39, 35, 0.12);
  background:
    radial-gradient(360px 240px at 18% 20%, rgba(135, 79, 55, 0.18), transparent 62%),
    radial-gradient(360px 220px at 82% 78%, rgba(196, 165, 123, 0.32), transparent 68%),
    rgba(255, 255, 255, 0.58);
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
}

.cover img {
  width: min(76%, 520px);
  max-height: 86%;
  object-fit: contain;
  border-radius: 22px;
  filter: drop-shadow(0 24px 40px rgba(62, 39, 35, 0.18));
}

.post-content {
  padding: 18px 28px 30px;
}

.post-content h2 {
  margin: 32px 0 10px;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.post-content h3 {
  margin: 24px 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

.post-content p {
  margin: 0 0 16px;
  color: #43302b;
  font-size: 16px;
}

.post-content ul {
  margin: 0 0 20px;
  padding-left: 22px;
  color: #43302b;
}

.post-content li {
  margin: 6px 0;
}

.post-content a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.sidebar {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 14px;
}

.side-card {
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--stroke);
  border-radius: 22px;
  box-shadow: 0 14px 30px var(--shadow);
  padding: 18px;
}

.side-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.side-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.side-links {
  display: grid;
  gap: 8px;
}

.side-links a {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(62, 39, 35, 0.1);
  color: var(--muted);
  font-size: 13px;
}

.side-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 16px 30px rgba(135, 79, 55, 0.22);
}

.btn-primary:hover {
  background: var(--brand-2);
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

footer {
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 13px;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(62, 39, 35, 0.12);
  padding-top: 16px;
}

.footer-row a {
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
}

.footer-row a:hover {
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
}

@media (max-width: 920px) {
  .post-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--container), calc(100% - 32px));
  }

  .brand {
    min-width: unset;
  }

  .nav-links {
    gap: 6px;
  }

  .post-hero,
  .post-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  h1 {
    max-width: none;
  }

  .post-nav {
    flex-direction: column;
  }
}
