:root {
  --blog-post-paper: rgb(246, 242, 235);
  --blog-post-surface: rgba(255, 252, 247, 0.94);
  --blog-post-surface-strong: rgba(255, 250, 244, 0.98);
  --blog-post-border: rgba(171, 137, 71, 0.2);
  --blog-post-shadow: 0 24px 60px rgba(80, 56, 27, 0.09);
  --blog-post-text: rgb(48, 35, 24);
  --blog-post-muted: rgb(123, 99, 74);
  --blog-post-accent: rgb(170, 130, 66);
  --blog-post-accent-strong: rgb(166, 74, 33);
  --blog-post-container: min(1240px, calc(100% - 40px));
  --blog-post-content-width: min(860px, 100%);
}

@font-face {
  font-family: "KoteDisplay";
  src: url("/files/userFonts/aw8rhm/lu5ryal2mhr8wa14");
  font-display: swap;
}

@font-face {
  font-family: "KoteBody";
  src: url("/files/userFonts/aw8rhm/lu5shwt0mhr8wa15");
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body.blog-post-body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(221, 193, 169, 0.34), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 242, 235, 1) 30%);
  color: var(--blog-post-text);
  font-family: "KoteBody", "Poppins", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.blog-post-body img {
  display: block;
  max-width: 100%;
}

body.blog-post-body a {
  color: inherit;
}

.blog-post-page {
  min-height: 100vh;
  padding: clamp(150px, 17vw, 285px) 0 100px;
}

.blog-post-shell {
  width: var(--blog-post-container);
  margin: 0 auto;
}

.blog-post-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 32px;
  align-items: start;
}

.blog-post-copy,
.blog-post-cover,
.blog-post-article,
.blog-post-footer {
  position: relative;
}

.blog-post-copy,
.blog-post-article {
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid var(--blog-post-border);
  border-radius: 30px;
  background: linear-gradient(180deg, var(--blog-post-surface-strong), rgba(255, 247, 239, 0.9));
  box-shadow: var(--blog-post-shadow);
}

.blog-post-copy::before,
.blog-post-article::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(171, 137, 71, 0.1);
  border-radius: 22px;
  pointer-events: none;
}

.blog-post-kicker {
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blog-post-accent);
}

.blog-post-title {
  margin: 0;
  font-family: "Fraunces", "KoteDisplay", serif;
  font-size: clamp(34px, 4.8vw, 58px);
  line-height: 1.04;
  color: var(--blog-post-text);
  text-wrap: balance;
}

.blog-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 22px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--blog-post-muted);
}

.blog-post-meta span + span::before {
  content: "•";
  margin-right: 18px;
  color: rgba(171, 137, 71, 0.72);
}

.blog-post-lead {
  margin: 24px 0 0;
  max-width: 40rem;
  font-size: 16px;
  line-height: 1.8;
  color: var(--blog-post-text);
}

.blog-post-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--blog-post-accent-strong);
}

.blog-post-back::before {
  content: "";
  width: 42px;
  height: 1px;
  background: currentColor;
}

.blog-post-cover {
  overflow: hidden;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--blog-post-shadow);
}

.blog-post-cover-link {
  display: block;
}

.blog-post-cover img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.blog-post-article {
  width: var(--blog-post-content-width);
  margin: 40px auto 0;
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(255, 247, 239, 0.92));
}

.blog-post-content {
  position: relative;
  z-index: 1;
  font-size: 17px;
  line-height: 1.85;
  color: var(--blog-post-text);
}

.blog-post-content > *:first-child {
  margin-top: 0;
}

.blog-post-content > *:last-child {
  margin-bottom: 0;
}

.blog-post-content p,
.blog-post-content ul,
.blog-post-content ol,
.blog-post-content blockquote,
.blog-post-content figure {
  margin: 0 0 22px;
}

.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4 {
  margin: 44px 0 18px;
  font-family: "Fraunces", "KoteDisplay", serif;
  color: var(--blog-post-text);
  line-height: 1.18;
  text-wrap: balance;
}

.blog-post-content h2 {
  font-size: clamp(30px, 3.2vw, 42px);
}

.blog-post-content h3 {
  font-size: clamp(25px, 2.6vw, 34px);
}

.blog-post-content h4 {
  font-size: clamp(21px, 2.1vw, 28px);
}

.blog-post-content strong {
  font-weight: 600;
}

.blog-post-content em {
  font-style: italic;
}

.blog-post-content ul,
.blog-post-content ol {
  padding-left: 1.4rem;
}

.blog-post-content li + li {
  margin-top: 10px;
}

.blog-post-content li p {
  margin-bottom: 0;
}

.blog-post-content a:not(.blog-post-media-link) {
  color: var(--blog-post-accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

.blog-post-figure {
  margin: 30px 0;
}

.blog-post-media-link {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  background: var(--blog-post-surface);
  box-shadow: 0 18px 44px rgba(75, 58, 33, 0.09);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-post-media-link:hover,
.blog-post-media-link:focus-visible,
.blog-post-cover-link:hover,
.blog-post-cover-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 22px 52px rgba(75, 58, 33, 0.14);
}

.blog-post-media-link img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.blog-post-footer {
  display: flex;
  justify-content: center;
  padding-top: 34px;
}

.blog-post-footer .blog-post-back {
  margin-top: 0;
}

.portfolio-project-lightbox {
  width: min(1200px, calc(100% - 32px));
  max-width: 1200px;
  padding: 22px;
  border: none;
  border-radius: 28px;
  background: rgba(24, 18, 14, 0.94);
  color: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.portfolio-project-lightbox::backdrop {
  background: rgba(20, 14, 10, 0.82);
  backdrop-filter: blur(5px);
}

.portfolio-project-lightbox-frame {
  display: grid;
  gap: 14px;
}

.portfolio-project-lightbox-close {
  justify-self: end;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
}

.portfolio-project-lightbox img {
  max-height: min(76vh, 900px);
  width: 100%;
  object-fit: contain;
}

.portfolio-project-lightbox-caption {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 991px) {
  .blog-post-page {
    padding-top: 165px;
  }

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

  .blog-post-article {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .blog-post-page {
    padding-top: 142px;
    padding-bottom: 76px;
  }

  .blog-post-shell {
    width: min(100% - 24px, 100%);
  }

  .blog-post-copy,
  .blog-post-article {
    padding: 24px 20px;
    border-radius: 24px;
  }

  .blog-post-copy::before,
  .blog-post-article::before {
    inset: 12px;
    border-radius: 16px;
  }

  .blog-post-cover {
    border-radius: 24px;
  }

  .blog-post-content {
    font-size: 16px;
    line-height: 1.78;
  }

  .blog-post-content h2,
  .blog-post-content h3,
  .blog-post-content h4 {
    text-wrap: pretty;
  }

  .blog-post-meta {
    display: grid;
    gap: 8px;
  }

  .blog-post-meta span + span::before {
    display: none;
  }
}
