@font-face {
  font-family: "NT Epika";
  src: url("./fonts/nt-epika-thin.otf") format("opentype");
  font-weight: 200;
  font-style: normal;
}

@font-face {
  font-family: "NT Epika";
  src: url("./fonts/nt-epika-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "NT Epika";
  src: url("./fonts/nt-epika-medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "NT Epika";
  src: url("./fonts/nt-epika-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: "NT Epika", Sans-serif;
  background: #fff;
  color: #1a1a1a;
  line-height: 1.6;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
  font-family: "NT Epika", Sans-serif;
}

body,
body * {
  font-family: "NT Epika", Sans-serif;
}

.page {
  min-height: 100vh;
  background: #fff;
}

.hero {
  background: url("./images/hamster-bg.webp") no-repeat center center;
  background-size: cover;
  min-height: 435px;
  display: flex;
  align-items: center;
}

.hero__inner {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 40px;
}

.hero__title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 56px 40px 80px;
}

.layout {
  display: grid;
  grid-template-columns: 25% 75%;
  gap: 60px;
  align-items: start;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.widget__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #5a534d;
  margin: 0 0 4px;
}

.widget__subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111;
  margin: 0 0 10px;
}

.archive-list {
  list-style: disc;
  padding-left: 18px;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.archive-btn {
  display: block;
  padding: 5px 0;
  color: #cc3366;
  font-size: 16px;
  text-decoration: none;
}

.archive-btn:hover,
.archive-btn.is-active {
  color: #000;
}

.search-row {
  display: flex;
  align-items: stretch;
}

.search-btn {
  padding: 30px 30px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #ccc;
  font-size: 0.875rem;
}

.search-row--hero {
  max-width: 34rem;
  margin: 1.25rem auto 0;
}

.search-row--hero .search-input {
  min-width: 0;
}

.main {
  min-width: 0;
}

.main {
  min-width: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.card {
  background: #fff;
  border: 1px solid #d8ceca;
  border-radius: 0;
  padding: 18px 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 398px;
}

.card__image-link {
  display: block;
  border-radius: 0;
  overflow: hidden;
  background: #ddd;
}

.card__image {
  display: block;
  width: 100%;
  height: 167px;
  object-fit: cover;
}

.card__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  font-weight: 600;
  background: #e2e2e2;
}

.card__title-link {
  text-decoration: none;
}

.card__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  color: #000;
  margin: 0;
}

.card__date {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e52264;
  font-size: 13px;
  line-height: 1;
  margin: 4px 2px 2px;
}

.card__icon {
  color: #111;
  font-size: 10px;
}

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.card__categories {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  min-height: 40px;
  margin: 1px 0 7px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.card__category-icon {
  color: #999;
  flex: 0 0 auto;
}

.card__excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 12px;
  color: #222;
  font-size: 10px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card__title-link:hover .card__title {
  color: #cc3366;
}

.card__meta {
  font-size: 17px;
  color: #000;
}

.card__read-more {
  display: block;
  width: 87px;
  margin: auto 2px 0 auto;
  padding: 7px 8px;
  border-radius: 4px;
  background: #f875bd;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
}

.card__read-more:hover {
  background: #e947a1;
  color: #fff;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: nowrap;
}

.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border: 1px solid #f08ab4;
  border-radius: 50%;
  background: #fff;
  color: #f08ab4;
  text-decoration: none;
  font-size: 17px;
  line-height: 1;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.pagination__btn:hover,
.pagination__btn.is-active {
  background: #f875bd;
  color: #fff;
}

.pagination__arrow {
  font-size: 28px;
  padding-bottom: 3px;
}

.pagination__btn.is-disabled {
  border-color: #ddd;
  color: #bbb;
  background: #f7f7f7;
  pointer-events: none;
}

.empty {
  padding: 60px 0;
  color: #888;
}

.empty p {
  font-family: monospace;
  background: #f5f5f5;
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
}

.detail-page {
  min-height: 100vh;
  background: #fff;
}

.detail-hero {
  position: relative;
  max-width: 1728px;
  margin: 0 auto;
  overflow: hidden;
  background: #ddd;
}

.detail-hero__image {
  display: block;
  width: 100%;
  height: min(430px, 48vw);
  min-height: 260px;
  object-fit: cover;
}

.detail-hero__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-left: clamp(32px, 14vw, 360px);
}

.detail-hero__title-wrap {
  padding: 10px 14px 12px;
}

.detail-hero__title {
  margin: 0;
  color: #fff;
  font-size: clamp(2.2rem, 4.2vw, 3.8rem);
  font-weight: 400;
  line-height: 1;
}

.detail-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px 24px 24px;
}

.detail-article {
  background: #fff;
  margin-bottom: 30px;
}

.detail-article--boxed {
  border: 5px double #ff66b7;
  border-radius: 20px;
  padding: 30px 32px 26px;
}

.content {
  font-size: 20px;
  line-height: 1.55;
  color: #000;
}

.content p,
.content figure,
.content ul,
.content ol,
.content blockquote,
.content pre,
.content table {
  margin: 0 0 1.4em;
}

.content > p:first-child {
  text-align: center;
}

.content a {
  color: inherit;
  text-decoration: none;
}

.content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 12px auto;
}

.content figure,
.content figcaption {
  text-align: center;
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 28px;
  align-items: center;
}

.post-nav__divider {
  width: 1px;
  height: 44px;
  background: #d7d7d7;
  justify-self: center;
}

.post-nav__col {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.post-nav__col--prev {
  justify-content: flex-start;
}

.post-nav__col--next {
  justify-content: flex-end;
}

.post-nav__item--minimal {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-decoration: none;
}

.post-nav__item--next {
  text-align: right;
  align-items: flex-end;
}

.post-nav__arrow {
  color: #d9d9d9;
  font-size: 42px;
  line-height: 1;
  text-decoration: none;
}

.post-nav__col--prev .post-nav__arrow {
  margin-right: 16px;
}

.post-nav__col--next .post-nav__arrow {
  margin-left: 16px;
}

.post-nav__label--minimal {
  color: #000;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.post-nav__title--minimal {
  color: #c79a5d;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
}

.detail-empty {
  text-align: center;
  padding: 80px 24px;
}

.comments-section {
  margin-top: 54px;
}

.comments-list {
  display: grid;
  gap: 18px;
  margin-bottom: 42px;
}

.comment-card {
  padding: 24px 28px;
  border: 1px solid #e6e1d7;
  border-radius: 20px;
  background: #fffdfa;
}

.comment-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}

.comment-card__author {
  color: #111;
  text-decoration: none;
  font-size: 1.2rem;
}

.comment-card__date {
  color: #8a8378;
  font-size: 0.95rem;
}

.comment-card__body {
  font-size: 1.05rem;
  line-height: 1.7;
}

.comment-form-wrap {
  margin-top: 20px;
}

.comment-form__title {
  margin: 0 0 20px;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 400;
  line-height: 1;
  color: #7b5d3d;
}

.comment-form__note {
  margin: 0 0 18px;
  font-size: 1.05rem;
}

.comment-form {
  display: grid;
  gap: 18px;
}

.comment-form__field {
  display: grid;
  gap: 8px;
}

.comment-form__field label {
  font-size: 1.05rem;
}

.comment-form__field input,
.comment-form__field textarea {
  width: 100%;
  border: 1px solid #8d8d8d;
  background: #fff;
  padding: 12px 14px;
  font-size: 1rem;
}

.comment-form__field textarea {
  min-height: 210px;
  resize: vertical;
}

.comment-form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 1rem;
}

.comment-form__checkbox input {
  margin-top: 4px;
}

.comment-form__submit {
  width: fit-content;
  min-width: 174px;
  border: 0;
  border-radius: 999px;
  padding: 14px 30px;
  background: #bd9663;
  color: #fff;
  cursor: pointer;
}

.admin-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 193, 219, 0.2), transparent 32%),
    linear-gradient(180deg, #fcfcfa 0%, #f3f5ef 100%);
}

.admin-page--centered {
  display: grid;
  place-items: center;
}

.admin-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px;
}

.admin-wrap--narrow {
  max-width: 1080px;
}

.admin-shell {
  display: grid;
  gap: 24px;
}

.admin-login {
  width: min(100%, 520px);
  padding: 24px;
}

.admin-login__card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e3e6dd;
  border-radius: 32px;
  padding: 36px;
  box-shadow: 0 28px 60px rgba(32, 27, 17, 0.08);
}

.admin-login__title,
.admin-title,
.admin-panel h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 400;
  line-height: 1;
}

.admin-eyebrow {
  margin: 0 0 8px;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ae6d87;
}

.admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #e3e6dd;
  box-shadow: 0 24px 54px rgba(24, 24, 24, 0.06);
}

.admin-topbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.admin-stat {
  padding: 20px 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #e3e6dd;
}

.admin-stat__label {
  display: block;
  margin-bottom: 6px;
  color: #7b766f;
  font-size: 0.88rem;
}

.admin-stat__value {
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 28px;
  align-items: start;
}

.admin-panel {
  padding: 28px;
  border: 1px solid #e4e9e3;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 54px rgba(24, 24, 24, 0.05);
}

.admin-panel--wide {
  padding: 32px;
}

.admin-panel--form {
  padding: 32px;
}

.admin-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-copy {
  color: #666;
  margin: 10px 0 0;
}

.admin-form,
.admin-list {
  display: grid;
  gap: 16px;
}

.admin-list--spacious {
  gap: 18px;
}

.admin-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-field {
  display: grid;
  gap: 8px;
}

.admin-field input,
.admin-field textarea {
  width: 100%;
  border: 1px solid #d6ded5;
  border-radius: 16px;
  padding: 12px 14px;
  background: #fff;
}

.admin-field textarea {
  min-height: 120px;
  resize: vertical;
}

.admin-field__editor {
  min-height: 280px !important;
}

.admin-check,
.admin-actions,
.admin-post__actions,
.admin-post__chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-button,
.admin-secondary,
.admin-danger,
.topbar__link {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
  transition: 160ms ease;
}

.admin-button {
  background: #1a1a1a;
  color: #fff;
}

.admin-button:hover,
.admin-secondary {
  transform: translateY(-1px);
}

.admin-button--full {
  width: 100%;
}

.admin-secondary {
  background: #edf5ed;
  color: #3d6b3d;
}

.admin-danger {
  background: #ffe9ef;
  color: #b6325e;
}

.topbar__link {
  border: 1px solid #ddd;
  color: #333;
  background: #fff;
}

.admin-alert {
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid transparent;
}

.admin-alert--success {
  background: #eef8ee;
  border-color: #d4ead4;
  color: #2d662d;
}

.admin-alert--error {
  background: #fff0f4;
  border-color: #ffd0de;
  color: #a12653;
}

.admin-post {
  padding: 22px 24px;
  border: 1px solid #e4e9e3;
  border-radius: 22px;
  background: #fcfdfb;
}

.admin-post__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.admin-post__title {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.admin-post__meta {
  color: #666;
  font-size: 0.96rem;
}

.chip {
  border-radius: 999px;
  padding: 6px 10px;
  background: #f3f6f2;
  color: #3d6b3d;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.chip.is-draft {
  background: #fff4d6;
  color: #9a6d00;
}

.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

@media (max-width: 1024px) {
  .layout,
  .admin-stats,
  .admin-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .container,
  .hero__inner,
  .admin-wrap {
    padding: 24px;
  }

  .admin-login__card,
  .admin-topbar,
  .admin-panel {
    padding: 24px;
  }

  .admin-topbar,
  .admin-panel__head,
  .admin-post__top {
    flex-direction: column;
  }

  .detail-hero__overlay {
    padding-left: 24px;
    padding-right: 24px;
    align-items: flex-start;
    padding-top: 34px;
  }

  .detail-article--boxed {
    padding: 24px 20px;
  }
}

@media (max-width: 600px) {
  .cards,
  .admin-grid-2,
  .post-nav {
    grid-template-columns: 1fr;
  }

  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-nav__divider {
    display: none;
  }

  .post-nav__col,
  .post-nav__col--prev,
  .post-nav__col--next {
    justify-content: space-between;
  }

  .content {
    font-size: 17px;
  }

  .comment-card__head,
  .comment-form__checkbox {
    flex-direction: column;
  }
}
