:root {
  --cream: #f3f1e2;
  --cream-dim: #cfccc0;
  --ink: #191541;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.9s cubic-bezier(0.16, 0.9, 0.22, 1),
    transform 0.9s cubic-bezier(0.16, 0.9, 0.22, 1);
  will-change: opacity, transform;
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 40px;
  color: var(--cream);
}

.brand-icon img {
  width: 45px;
  height: auto;
  display: block;
}

nav {
  display: flex;
  gap: 0;
  flex: 1;
  justify-content: space-evenly;
}

nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2px;
  opacity: 0.92;
  transition: opacity 0.2s ease;
}

nav a:hover { opacity: 0.6; }
nav a.active { opacity: 1; border-bottom: 1px solid rgba(243, 241, 226, 0.6); padding-bottom: 3px; }

.btn-join {
  display: inline-block;
  background: var(--cream);
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  padding: 7px 17px;
  transition: background 0.2s ease;
}

.btn-join:hover { background: #ffffff; }

.writing-hero {
  text-align: center;
  padding: 96px 24px 20px;
}

.writing-hero .eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 26px;
}

.writing-hero h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 60px;
  line-height: 1.04;
  margin-bottom: 26px;
}

.writing-hero p {
  max-width: 620px;
  margin: 0 auto;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 24px;
  line-height: 1.4;
  opacity: 0.72;
}

.writing {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 72px 60px 120px;
}

.entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 44px 4px;
  border-top: 1px solid rgba(25, 21, 65, 0.14);
  text-decoration: none;
  color: var(--ink);
}

.writing .entry:last-child { border-bottom: 1px solid rgba(25, 21, 65, 0.14); }

.entry-main { max-width: 720px; }

.entry-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 40px;
  line-height: 1.05;
  transition: opacity 0.25s ease;
}

.entry-desc {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 19px;
  line-height: 1.4;
  opacity: 0.55;
  margin-top: 14px;
}

.entry-meta {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
}

.entry-cat {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.3;
  white-space: nowrap;
}

.entry-tag {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(25, 21, 65, 0.55);
  border: 1px solid rgba(25, 21, 65, 0.28);
  padding: 10px 18px;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.entry:hover .entry-title { opacity: 0.55; }
.entry:hover .entry-tag {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

.writing-empty {
  text-align: center;
  padding: 80px 24px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 22px;
  opacity: 0.45;
}

.writing-loading {
  text-align: center;
  padding: 80px 24px;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.35;
}

.is-hidden { display: none !important; }

/* Post detail */
.post-hero {
  text-align: center;
  padding: 96px 24px 48px;
  max-width: 820px;
  margin: 0 auto;
}

.post-hero .eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 20px;
}

.post-hero h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 56px;
  line-height: 1.06;
  margin-bottom: 20px;
}

.post-hero .post-desc {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 22px;
  line-height: 1.45;
  opacity: 0.6;
  margin-bottom: 24px;
}

.post-hero .post-date {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.35;
}

.post-back {
  display: inline-block;
  margin-bottom: 32px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

.post-back:hover { opacity: 0.75; }

.post-body-wrap {
  flex: 1;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 120px;
}

header + .post-body-wrap {
  padding-top: 56px;
}

.post-body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink);
}

.post-body h1,
.post-body h2,
.post-body h3 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
  margin: 2em 0 0.6em;
}

.post-body h1 { font-size: 40px; }
.post-body h2 { font-size: 32px; }
.post-body h3 { font-size: 24px; }

.post-body p { margin-bottom: 1.25em; }

.post-body ul,
.post-body ol {
  margin: 0 0 1.25em 1.4em;
}

.post-body li { margin-bottom: 0.4em; }

.post-body blockquote {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 22px;
  line-height: 1.45;
  opacity: 0.7;
  border-left: 2px solid rgba(25, 21, 65, 0.2);
  padding-left: 24px;
  margin: 1.5em 0;
}

.post-body a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2em auto;
}

.post-body .ql-align-center { text-align: center; }
.post-body .ql-align-right { text-align: right; }
.post-body .ql-align-justify { text-align: justify; }

.post-not-found {
  text-align: center;
  padding: 120px 24px;
  flex: 1;
}

.post-not-found h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 44px;
  margin-bottom: 16px;
}

.post-not-found p {
  opacity: 0.5;
  margin-bottom: 32px;
}

.post-not-found a {
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.site-footer {
  color: #f3f1e2;
  padding: 64px 60px 34px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 1.6fr 1.2fr;
  gap: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(243, 241, 226, 0.16);
}

.footer-brand .footer-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.footer-brand .footer-mark img { width: 38px; height: auto; display: block; }

.footer-brand .footer-logo {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 1;
}

.footer-tag {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  max-width: 260px;
  opacity: 0.75;
  margin-bottom: 24px;
}

.footer-socials { display: flex; gap: 20px; }

.footer-socials a {
  color: #f3f1e2;
  text-decoration: none;
  font-size: 13px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.footer-socials a:hover { opacity: 0.45; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col h4 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 18px;
}

.footer-col a {
  display: block;
  color: #f3f1e2;
  text-decoration: none;
  font-size: 14px;
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: 12px;
  transition: opacity 0.2s ease;
}

.footer-col a:hover { opacity: 0.5; }

.footer-news h4 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.1;
  margin-bottom: 10px;
}

.footer-news p {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.5;
  opacity: 0.75;
  margin-bottom: 20px;
  max-width: 280px;
}

.footer-form { display: flex; max-width: 320px; }

.footer-form input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 1px solid rgba(243, 241, 226, 0.35);
  border-right: none;
  color: #f3f1e2;
  font-family: inherit;
  font-size: 13px;
  padding: 11px 14px;
  outline: none;
}

.footer-form input::placeholder { color: rgba(243, 241, 226, 0.5); }
.footer-form input:focus { border-color: rgba(243, 241, 226, 0.7); }

.footer-form button {
  background: #f3f1e2;
  color: var(--ink);
  border: 1px solid #f3f1e2;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.3px;
  padding: 11px 20px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.footer-form button:hover { background: #ffffff; }

.footer-form-status {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0.75;
  min-height: 1.2em;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  font-size: 12px;
  opacity: 0.6;
}

.footer-bottom .footer-legal { display: flex; gap: 22px; }

.footer-bottom a {
  color: #f3f1e2;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer-bottom a:hover { opacity: 0.55; }

@media (max-width: 760px) {
  header { padding: 22px; }
  .writing-hero { padding: 64px 22px 12px; }
  .writing-hero h1 { font-size: 44px; }
  .writing-hero p { font-size: 20px; }
  .writing { padding: 48px 22px 80px; }
  .entry {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 32px 2px;
  }
  .entry-title { font-size: 32px; }
  .entry-desc { font-size: 17px; }
  .entry-meta {
    flex-wrap: wrap;
    gap: 12px 18px;
    width: 100%;
    justify-content: flex-end;
  }
  .entry-cat { white-space: normal; }
  .post-hero { padding: 64px 22px 32px; }
  .post-hero h1 { font-size: 40px; }
  .post-body-wrap { padding: 0 22px 80px; }
  .post-body { font-size: 17px; }
  .post-body h1 { font-size: 32px; }
  .post-body h2 { font-size: 26px; }
  .post-body blockquote { font-size: 19px; padding-left: 16px; }
  .site-footer { padding: 56px 22px 28px; }
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 14px; align-items: flex-start; }
}
