:root {
  --bg: #FCFCFA;
  --ink: #111110;
  --green: #09AF58;
  --green-dark: #08964c;
  --green-deep: #0a7d40;
  --green-deepest: #06351c;
  --mint: #DDFFDC;
  --muted: #55554e;
  --muted-2: #6b6b62;
  --muted-3: #9a9a90;
  --border: #ebebe6;
  --border-2: #e2e2da;
  --surface: #F6F6F2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--mint);
  color: var(--green-deepest);
}

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

::placeholder {
  color: #b3b3aa;
}

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
  background: rgba(252, 252, 250, 0.82);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand__mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--green);
  display: inline-block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav__link {
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 8px;
  transition: all 0.15s ease;
  background: transparent;
  color: var(--muted);
}

.nav__link:hover {
  color: var(--ink);
}

.nav__link--active {
  background: var(--ink);
  color: var(--bg);
}

.nav__link--active:hover {
  color: var(--bg);
}

.nav__divider {
  width: 1px;
  height: 20px;
  background: var(--border-2);
  margin: 0 4px;
}

.btn-signin {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--bg);
  background: var(--ink);
  padding: 8px 16px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.btn-signin:hover {
  background: var(--green);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  padding: 5px 12px 5px 6px;
  border-radius: 20px;
  border: 1px solid var(--border-2);
  background: #fff;
  transition: border-color 0.15s ease;
}

.user-pill:hover {
  border-color: var(--green);
}

.user-pill__avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.user-pill__name {
  font-size: 13.5px;
  font-weight: 600;
}

/* ---------- Shared bits ---------- */

.eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--green);
}

.hl {
  background: var(--mint);
  color: var(--green-deepest);
  padding: 0 0.12em;
  border-radius: 6px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

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

/* ---------- Home ---------- */

.hero {
  padding: 84px 0 56px;
  border-bottom: 1px solid var(--border);
}

.hero .eyebrow {
  margin-bottom: 22px;
}

.hero__title {
  font-weight: 700;
  font-size: clamp(42px, 7.5vw, 76px);
  line-height: 1;
  letter-spacing: -0.035em;
  margin: 0 0 26px;
  max-width: 11ch;
}

.hero__lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 540px;
  margin: 0 0 32px;
}

.hero__lead strong {
  font-weight: 700;
  color: var(--ink);
}

.section {
  padding: 56px 0 64px;
}

.section .eyebrow {
  margin-bottom: 8px;
}

.section__title {
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.section__lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted-2);
  margin: 0 0 22px;
  max-width: 540px;
}

.embed-frame {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}

.embed-frame iframe {
  display: block;
  width: 100%;
  height: 352px;
  border: 0;
}

.site-footer {
  padding: 24px 0 64px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-3);
}

/* ---------- Page head (writings / about) ---------- */

.page-head {
  padding: 80px 0 36px;
  border-bottom: 1px solid var(--border);
}

.page-head .eyebrow {
  margin-bottom: 18px;
}

.page-head__title {
  font-weight: 700;
  font-size: clamp(40px, 6.5vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 16px;
}

.page-head__title--wide {
  max-width: 16ch;
}

.page-head__lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 520px;
  margin: 0;
}

/* ---------- Writings index ---------- */

.writings {
  padding: 32px 0 20px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  background: #fff;
  color: var(--muted-2);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.chip:hover {
  border-color: var(--green);
  color: var(--green);
}

.chip--active,
.chip--active:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.post-list {
  border-bottom: 1px solid var(--border);
}

.post-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 30px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

.post-row__meta {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--muted-3);
  padding-top: 3px;
}

.topic-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green-deep);
  background: var(--mint);
  padding: 4px 9px;
  border-radius: 5px;
  margin-bottom: 12px;
}

.post-row__title {
  display: block;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 8px;
  transition: color 0.15s ease;
}

.post-row__title:hover {
  color: var(--green);
}

.post-row__dek {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted-2);
  margin: 0;
  max-width: 560px;
}

.empty-state {
  padding: 40px 0;
  font-size: 16px;
  color: var(--muted-3);
}

/* ---------- Single article ---------- */

.article {
  max-width: 680px;
  margin: 0 auto;
  padding: 64px 0 32px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.15s ease;
}

.back-link:hover {
  color: var(--green);
}

.article .topic-tag {
  margin-top: 34px;
  margin-bottom: 18px;
}

.article__title {
  font-weight: 700;
  font-size: clamp(34px, 5.5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}

.article__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-3);
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.article__foot {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

/* ---------- Prose (rendered markdown) ---------- */

.prose {
  font-size: 18px;
  line-height: 1.75;
  color: #33332e;
}

.prose > p:first-child {
  font-size: 21px;
  line-height: 1.6;
  color: #2c2c27;
  font-weight: 500;
  margin: 34px 0 24px;
}

.prose p {
  margin: 0 0 22px;
}

.prose h2 {
  font-weight: 700;
  font-size: 25px;
  letter-spacing: -0.02em;
  margin: 40px 0 14px;
}

.prose h3 {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  margin: 32px 0 12px;
}

.prose ul,
.prose ol {
  margin: 0 0 24px;
  padding-left: 22px;
  line-height: 1.7;
}

.prose li {
  margin-bottom: 9px;
}

.prose a {
  color: var(--green);
  font-weight: 600;
  border-bottom: 1px solid #aee9c3;
}

.prose blockquote {
  margin: 30px 0;
  padding: 6px 0 6px 22px;
  border-left: 3px solid var(--green);
  font-size: 20px;
  line-height: 1.5;
  color: #1a1a16;
  font-weight: 500;
  font-style: normal;
}

.prose blockquote p {
  margin: 0;
}

.prose code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.86em;
  background: #f0f0ea;
  padding: 2px 6px;
  border-radius: 4px;
}

.prose pre {
  background: #0f130f;
  color: #dcf7e0;
  font-size: 13.5px;
  line-height: 1.6;
  padding: 18px 20px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 0 0 22px;
}

.prose pre code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* ---------- About ---------- */

.about-body {
  max-width: 600px;
  margin-top: 30px;
}

.about-body p {
  font-size: 18px;
  line-height: 1.7;
  color: #3a3a34;
  margin: 0 0 18px;
}

.about-body p:last-child {
  margin-bottom: 0;
}

.about-body strong {
  font-weight: 700;
}

.elsewhere {
  padding: 48px 0;
}

.elsewhere .eyebrow {
  margin-bottom: 16px;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid #d8d8d0;
  border-radius: 8px;
  padding: 9px 16px;
  transition: all 0.15s ease;
}

.pill-link:hover {
  border-color: var(--green);
  color: var(--green);
}

/* ---------- Workshops catalog ---------- */

.workshop-list {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
}

.workshop-item {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.workshop-item:last-child {
  border-bottom: 1px solid var(--border);
}

.workshop-item__title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.workshop-item__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted-3);
  margin-bottom: 12px;
}

.workshop-item__meta .topic-tag {
  margin-bottom: 0;
}

.workshop-item__summary {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted-2);
  margin: 0 0 14px;
  max-width: 620px;
}

.workshop-item__links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
  font-weight: 600;
}

.workshop-item__links a {
  color: var(--muted);
}

.workshop-item__links a:hover {
  color: var(--green);
}

/* ---------- Logout form in header ---------- */

.logout-form {
  margin: 0;
  padding: 0;
  line-height: 0;
}

.logout-form .user-pill {
  font-family: inherit;
  font-size: inherit;
}

/* ---------- Auth ---------- */

.auth-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 64px 28px;
  display: flex;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 404px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.05);
}

.auth-card__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-card__title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.auth-card__sub {
  font-size: 14px;
  color: var(--muted-2);
  margin: 0 0 22px;
}

.auth-error {
  font-size: 13.5px;
  color: #b5462f;
  background: #fdecea;
  border: 1px solid #f3d3cc;
  border-radius: 9px;
  padding: 10px 12px;
  margin: 0 0 16px;
}

.auth-form {
  display: flex;
  flex-direction: column;
}

.auth-label {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
}

.auth-optional {
  font-weight: 500;
  color: var(--muted-3);
}

.auth-input {
  border: 1px solid #ddddd5;
  border-radius: 9px;
  padding: 11px 13px;
  font-size: 15px;
  background: #fff;
  margin-bottom: 16px;
  color: var(--ink);
}

.auth-input:focus {
  outline: none;
  border-color: var(--green);
}

.auth-submit {
  display: block;
  text-align: center;
  cursor: pointer;
  background: var(--green);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 13px;
  border: none;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.auth-submit:hover {
  background: var(--green-dark);
}

.auth-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted-3);
  text-align: center;
  margin: 16px 0 0;
}

.auth-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
}

.auth-sent {
  text-align: center;
}

.auth-sent__icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 18px;
}

.auth-sent__lead {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 4px;
}

.auth-sent__email {
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 18px;
  word-break: break-all;
}

.auth-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
}

/* ---------- Engagement + comments ---------- */

.inline-form {
  margin: 0;
  display: inline-flex;
}

.engage {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 15px;
  border-radius: 9px;
  border: 1px solid var(--border-2);
  color: var(--muted);
  background: #fff;
  transition: all 0.12s ease;
}

.like-btn--on {
  border-color: var(--green);
  color: var(--green);
  background: #f1fcf3;
}

.engage__count {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-3);
}

.comments {
  margin-top: 34px;
}

.comments__title {
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}

.btn-dark {
  cursor: pointer;
  font-family: inherit;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border: none;
  border-radius: 9px;
  transition: background 0.15s ease;
  text-decoration: none;
}

.btn-dark:hover {
  background: var(--green);
}

.btn-dark--sm {
  font-size: 13px;
  padding: 7px 15px;
}

.comment-form textarea,
.reply-form textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
  background: #fff;
  color: #33332e;
}

.comment-form textarea:focus,
.reply-form textarea:focus {
  outline: none;
  border-color: var(--green);
}

.comment-form__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.comment-signin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}

.comment-signin span {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
}

.comment-list {
  margin-top: 18px;
}

.comment {
  padding: 18px 0;
  border-top: 1px solid #f0f0ea;
}

.comment__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.comment__avatar {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.comment__avatar--author {
  background: var(--ink);
  color: #fff;
}

.comment__avatar--sm {
  width: 26px;
  height: 26px;
  font-size: 11px;
}

.comment__author {
  font-size: 14px;
  font-weight: 600;
}

.comment__badge {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--green-deep);
  background: var(--mint);
  padding: 2px 7px;
  border-radius: 5px;
}

.comment__pending {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--orange, #e65100);
  background: #fff3e0;
  padding: 2px 7px;
  border-radius: 5px;
}

.comment__time {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--muted-3);
}

.comment__body {
  font-size: 15px;
  line-height: 1.6;
  color: #33332e;
  margin: 0 0 10px;
  white-space: pre-wrap;
}

.comment__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.like-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-3);
  background: none;
  border: none;
  padding: 0;
  transition: color 0.12s ease;
}

.like-link--on {
  color: var(--green);
}

.reply {
  display: inline-block;
}

.reply > summary {
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-2);
}

.reply > summary::-webkit-details-marker {
  display: none;
}

.reply > summary:hover {
  color: var(--green);
}

.reply-form {
  margin: 12px 0 4px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.comment__replies {
  margin-left: 34px;
  margin-top: 6px;
  border-left: 2px solid #f0f0ea;
  padding-left: 16px;
}

.reply-item {
  padding: 12px 0;
}

/* ---------- Newsletter signup ---------- */

.subscribe__form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  flex-wrap: wrap;
}

.subscribe__input {
  flex: 1;
  min-width: 220px;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  background: #fff;
  color: var(--ink);
}

.subscribe__input:focus {
  outline: none;
  border-color: var(--green);
}

.subscribe__thanks {
  font-size: 16px;
  font-weight: 600;
  color: var(--green-deep);
}
