@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --bg: #ededed;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #6c655d;
  --accent: #c25a2c;
  --border: #e6dfd6;
  --shadow: 0 16px 40px rgba(24, 20, 16, 0.08);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

.container {
  width: min(960px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  background: rgba(237, 237, 237, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.site-nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav a:hover,
.post-item a:hover,
.post-tags a:hover {
  color: var(--accent);
}

.blog-brand {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0 auto 1rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.blog-brand:hover,
.blog-brand:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

.blog-brand-logo {
  display: block;
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
  width: 2.6rem;
  height: 2.6rem;
  margin-right: 0.1rem;
  object-fit: contain;
  flex: 0 0 2.6rem;
}

.post-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.post-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.post-topbar .post-nav {
  grid-column: 2;
  margin-bottom: 0;
}

.post-dates {
  grid-column: 3;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: right;
}

.post-nav a {
  text-decoration: none;
  color: var(--muted);
}

.post-nav a:hover {
  color: var(--accent);
}

main {
  padding: 3.5rem 0 4rem;
}

.page-header {
  margin-bottom: 2.5rem;
}

.page-header h1 {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
}

.page-description {
  color: var(--muted);
  margin: 0;
}

.post-list {
  display: grid;
  gap: 1rem;
}

.post-item {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 22px rgba(24, 20, 16, 0.06);
  border-radius: 8px;
}

.post-card-link {
  display: block;
  padding: 1rem 1.1rem;
  color: inherit;
  text-decoration: none;
}

.post-item:hover {
  border-color: #d7cabd;
  box-shadow: 0 10px 26px rgba(24, 20, 16, 0.09);
}

.post-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.post-item h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.post-item a {
  text-decoration: none;
  color: var(--text);
}

.post-meta {
  flex: 0 0 auto;
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.post-card-link > p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}

.post-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 0;
  padding: 0;
}

.post-skill-chip {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.28rem 0.65rem;
  border: 0;
  border-radius: 999px;
  color: #123d34;
  background: #d8f0e7;
  box-shadow: 0 1px 2px rgba(18, 61, 52, 0.08);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
}

.post {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.post-header h1 {
  margin-top: 0;
  font-size: 2.5rem;
}

.post-description {
  color: var(--muted);
  font-size: 1.1rem;
}

.post-skills-card {
  margin-top: 1rem;
  border: 1px solid #d9d0ee;
  border-radius: 8px;
  background: #f7f3ff;
}

.post-skills-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.85rem;
  color: #3f315f;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  list-style: none;
}

.post-skills-card summary::-webkit-details-marker {
  display: none;
}

.post-skills-card summary::after {
  content: "+";
  color: #67508e;
  font-size: 1.1rem;
  line-height: 1;
}

.post-skills-card[open] summary::after {
  content: "-";
}

.post-skills-card-count {
  margin-left: auto;
  color: #67508e;
  font-size: 0.8rem;
  font-weight: 700;
}

.post-skills-card-body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 0.85rem 0.85rem;
}

.post-tldr-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #dfd1af;
  border-radius: 8px;
  background: #fff8e6;
  color: #5b4315;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.post-tldr-card:hover,
.post-tldr-card:focus-visible {
  background: #fff1c9;
  border-color: #c9a75a;
  color: #46320d;
  text-decoration: none;
}

.post-tldr-action {
  flex: 0 0 auto;
  color: #7a5a18;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.post-tldr-details {
  display: block;
}

.post-tldr-details summary {
  cursor: pointer;
  list-style: none;
}

.post-tldr-details summary::-webkit-details-marker {
  display: none;
}

.post-tldr-details p {
  margin: 0.65rem 0 0;
  color: #5b4315;
  font-weight: 500;
}

.post-tags {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.post-tags a {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.post-content {
  margin-top: 2rem;
}

.post-content h2,
.post-content h3 {
  margin-top: 2rem;
}

.post-content p {
  margin: 1.1rem 0;
}

.post-content strong,
.post-content b {
  color: var(--text);
  font-weight: 800;
}

.post-content ul,
.post-content ol {
  margin: 0.75rem 0 1rem;
  padding-left: 1.25rem;
}

.post-content li {
  margin-bottom: 0.4rem;
}

.post-content img {
  display: block;
  margin: 1.5rem auto;
  max-width: 100%;
  height: auto;
}

.footnotes hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 2rem 0 1.5rem;
}

.footnotes {
  color: var(--muted);
  font-size: 0.85rem;
  opacity: 0.7;
}

.footnotes a {
  color: inherit;
}

.footnote-ref {
  font-size: 0.7em;
}

.site-footer {
  margin-top: 2rem;
  padding-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .container {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  text-align: center;
}

.footer-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 720px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .site-nav a {
    margin-left: 0;
    margin-right: 1rem;
  }

  .post-nav,
  main > .post-nav,
  .post-topbar .post-nav {
    justify-content: center;
    width: 100%;
  }

  .blog-brand {
    margin-bottom: 0.35rem;
  }

  .post-item-header {
    flex-direction: column;
    gap: 0.35rem;
  }

  .post-meta {
    margin-top: 0;
  }

  .post {
    padding: 1.75rem;
  }

  .post-topbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .post-topbar .post-nav {
    margin-bottom: 0;
  }

  .post-dates {
    text-align: center;
  }
}
