:root {
  --page: #f4f3ef;
  --paper: #fffdf8;
  --ink: #171717;
  --muted: #6d6a64;
  --line: #d8d5cd;
  --accent: #ef6b49;
  --accent-dark: #bd3f24;
  --dark: #17211e;
  --dark-soft: #23302b;
  --success: #2d7b55;
  --error: #b63e3e;
  --radius: 22px;
  --shadow: 0 18px 50px rgba(27, 31, 29, .08);
  --max: 1220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 10px 14px;
  color: #fff;
  background: var(--dark);
  border-radius: 10px;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 80;
  top: 0;
  border-bottom: 1px solid rgba(23, 23, 23, .08);
  background: rgba(244, 243, 239, .92);
  backdrop-filter: blur(18px);
}
.site-header__inner {
  width: min(calc(100% - 40px), var(--max));
  min-height: 78px;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto minmax(230px, 1fr);
  align-items: center;
  gap: 26px;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  min-width: 0;
}
.site-brand__logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 12px;
}
.site-brand__text { display: grid; line-height: 1.15; }
.site-brand__text b { font-size: 17px; letter-spacing: -.02em; }
.site-brand__text small { margin-top: 5px; color: var(--muted); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.site-navigation { display: flex; align-items: center; justify-content: center; gap: 28px; }
.site-navigation a { position: relative; padding: 25px 0; font-size: 14px; font-weight: 650; }
.site-navigation a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  background: var(--accent);
  transition: transform .2s ease;
}
.site-navigation a:hover::after, .site-navigation a:focus-visible::after { transform: scaleX(1); }
.site-account { display: flex; align-items: center; justify-content: flex-end; gap: 14px; font-size: 14px; font-weight: 650; }
.site-account__profile { display: flex; align-items: center; gap: 8px; }
.site-menu-button { display: none; }

.avatar-xs, .avatar {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #dedbd3;
  color: var(--dark);
}
.avatar-xs { width: 34px; height: 34px; }
.avatar { width: 74px; height: 74px; }
.avatar-xs img, .avatar img { width: 100%; height: 100%; object-fit: cover; }

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button--dark { color: #fff; background: var(--dark); }
.button--dark:hover { background: var(--dark-soft); box-shadow: 0 10px 24px rgba(23, 33, 30, .18); }
.button--accent { color: #fff; background: var(--accent); }
.button--accent:hover { background: var(--accent-dark); box-shadow: 0 10px 24px rgba(239, 107, 73, .24); }
.button--light { border-color: var(--line); background: rgba(255,255,255,.65); }
.button--quiet { border-color: var(--line); padding-inline: 13px; }

.site-main { min-height: 65vh; }
.hero {
  width: min(calc(100% - 40px), var(--max));
  margin: 38px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr);
  overflow: hidden;
  border-radius: 32px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.hero__content {
  padding: clamp(50px, 7vw, 96px);
  background:
    radial-gradient(circle at 86% 12%, rgba(239,107,73,.18), transparent 34%),
    linear-gradient(135deg, #fffefb, #ecebe5);
}
.eyebrow {
  display: inline-block;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero h1, .archive-hero h1, .single-entry__header h1, .author-hero h1 {
  margin: 17px 0 20px;
  max-width: 900px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 7.2vw, 96px);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .98;
}
.hero__content > p {
  max-width: 710px;
  margin: 0;
  color: #55534e;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.55;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 390px;
  padding: 46px;
  color: #fff;
  background:
    linear-gradient(180deg, transparent, rgba(0,0,0,.25)),
    var(--dark);
}
.hero__panel span { color: #adbcb6; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero__panel b { margin-top: 14px; font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 500; line-height: 1.15; }
.hero__panel p { margin: 16px 0 0; color: #cdd6d2; }

.content-section {
  width: min(calc(100% - 40px), var(--max));
  margin: 96px auto;
}
.content-section--contrast {
  width: 100%;
  padding: 92px max(20px, calc((100% - var(--max)) / 2));
  color: #fff;
  background: var(--dark);
}
.content-section--contrast .eyebrow { color: #ff987d; }
.content-section--contrast .section-heading a { color: #cbd5d1; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 34px;
}
.section-heading h2 { margin: 6px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 4vw, 54px); font-weight: 500; letter-spacing: -.035em; line-height: 1.08; }
.section-heading > a { color: var(--muted); font-weight: 750; }
.section-heading > a:hover { color: var(--accent-dark); }

.entry-grid { display: grid; gap: 18px; }
.entry-grid--posts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.entry-card {
  display: flex;
  min-height: 320px;
  flex-direction: column;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.entry-card:hover { transform: translateY(-4px); border-color: #bcb8ae; box-shadow: var(--shadow); }
.entry-card--lead { grid-column: span 2; background: #e4e9e3; }
.entry-card__meta { display: flex; flex-wrap: wrap; gap: 10px 18px; color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.entry-card h3 { margin: 22px 0 14px; font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 500; letter-spacing: -.025em; line-height: 1.13; }
.entry-card--lead h3 { max-width: 760px; font-size: clamp(36px, 4.5vw, 58px); }
.entry-card p { margin: 0; color: var(--muted); }
.entry-card footer { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 28px; color: var(--muted); font-size: 13px; }
.entry-card footer a { margin-left: auto; color: var(--ink); font-weight: 800; }

.portfolio-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.portfolio-card {
  position: relative;
  min-height: 310px;
  padding: 34px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: var(--radius);
  background: var(--dark-soft);
}
.portfolio-card::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -80px;
  bottom: -85px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
}
.portfolio-card__number { color: #9eada7; font-family: Georgia, serif; font-size: 18px; }
.portfolio-card h3 { margin: 38px 0 14px; font-family: Georgia, serif; font-size: 32px; font-weight: 500; line-height: 1.1; }
.portfolio-card p { color: #cbd4d0; }
.portfolio-card__link { position: absolute; right: 34px; bottom: 30px; left: 34px; font-weight: 800; }

.empty-state {
  padding: 60px;
  text-align: center;
  border: 1px dashed #bbb7ad;
  border-radius: var(--radius);
  background: rgba(255,255,255,.45);
}
.empty-state span, .empty-state p { color: var(--muted); }
.empty-state h3, .empty-state h2 { margin: 10px 0 22px; font-family: Georgia, serif; font-size: 32px; font-weight: 500; }
.empty-state--dark { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.04); }
.empty-state--dark p { color: #bac5c1; }

.statement {
  width: min(calc(100% - 40px), 940px);
  margin: 120px auto;
  text-align: center;
}
.statement blockquote { margin: 22px 0; font-family: Georgia, serif; font-size: clamp(34px, 5vw, 58px); letter-spacing: -.04em; line-height: 1.12; }
.statement p { max-width: 720px; margin: auto; color: var(--muted); font-size: 19px; }

.archive-hero, .author-hero, .single-entry__header {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}
.archive-hero { padding: 100px 0 54px; }
.archive-hero h1 { margin-bottom: 16px; }
.archive-hero p { max-width: 720px; margin: 0; color: var(--muted); font-size: 21px; }
.archive-section { margin-top: 22px; }
.archive-list { border-top: 1px solid var(--line); }
.archive-item {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 60px;
  gap: 24px;
  align-items: start;
  padding: 38px 0;
  border-bottom: 1px solid var(--line);
}
.archive-item__index { color: #9f9b91; font-family: Georgia, serif; font-size: 24px; }
.archive-item h2 { margin: 12px 0 10px; font-family: Georgia, serif; font-size: clamp(30px, 4vw, 48px); font-weight: 500; letter-spacing: -.035em; line-height: 1.1; }
.archive-item p { max-width: 780px; margin: 0; color: var(--muted); }
.archive-item footer { display: flex; gap: 16px; margin-top: 17px; color: var(--muted); font-size: 13px; }
.archive-item__arrow { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 22px; transition: background .2s, color .2s; }
.archive-item__arrow:hover { color: #fff; background: var(--dark); }

.single-entry { padding-top: 72px; }
.single-entry__header { max-width: 980px; text-align: center; }
.single-entry__back { display: block; width: max-content; margin: 0 auto 42px; color: var(--muted); font-weight: 750; }
.single-entry__header h1 { font-size: clamp(46px, 7vw, 86px); }
.single-entry__lead { max-width: 780px; margin: 0 auto; color: var(--muted); font-size: 21px; }
.single-entry__meta { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 28px; color: var(--muted); font-size: 14px; }
.single-entry__meta a { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 750; }
.single-entry__body {
  width: min(calc(100% - 40px), 780px);
  margin: 70px auto;
  padding: 0;
}
.prose { font-family: Georgia, "Times New Roman", serif; font-size: 21px; line-height: 1.82; }
.prose h2, .prose h3, .prose h4 { margin: 1.8em 0 .65em; color: var(--ink); font-family: Inter, sans-serif; line-height: 1.2; letter-spacing: -.03em; }
.prose h2 { font-size: 38px; }
.prose h3 { font-size: 29px; }
.prose p { margin: 0 0 1.35em; }
.prose a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 4px; }
.prose blockquote { margin: 2em -55px; padding: 28px 34px; border-left: 5px solid var(--accent); background: #e8e6df; font-size: 28px; line-height: 1.45; }
.prose pre { overflow: auto; padding: 22px; color: #e9f1ed; background: var(--dark); border-radius: 16px; font: 14px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; }
.prose img { display: block; margin: 2em auto; border-radius: 16px; }
.single-entry__footer { width: min(calc(100% - 40px), 900px); margin: 0 auto 80px; }
.author-card { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 22px; padding: 30px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.author-card span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.author-card h3 { margin: 3px 0 5px; font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.author-card p { margin: 0 0 10px; color: var(--muted); }
.author-card a { font-weight: 800; }

.interaction-section, .comments-section {
  width: min(calc(100% - 40px), 900px);
  margin: 70px auto;
  padding: 40px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 12px 40px rgba(20,25,23,.05);
}
.interaction-section header h2, .comments-section__header h2 { margin: 5px 0 0; font-family: Georgia, serif; font-size: 36px; font-weight: 500; }
.reaction-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.reaction-row form { margin: 0; }
.reaction-row button, .reaction-row a { display: flex; min-width: 68px; height: 54px; align-items: center; justify-content: center; gap: 6px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; }
.reaction-row button:hover, .reaction-row a:hover { border-color: var(--accent); transform: translateY(-2px); }
.reaction-row span { font-size: 25px; }
.reaction-row b { min-width: 8px; color: var(--muted); font-size: 12px; }
.comments-section__header h2 small { color: var(--muted); font-family: Inter, sans-serif; font-size: 16px; }
.comment-list { margin-top: 28px; }
.comment-card { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 14px; padding: 24px 0; border-top: 1px solid var(--line); }
.comment-card header { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.comment-card header a { font-weight: 800; }
.comment-card time { color: var(--muted); font-size: 12px; }
.comment-card p { margin: 8px 0 0; white-space: normal; }
.comments-empty { color: var(--muted); }
.comment-form { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line); }
.comment-form label { display: block; margin-bottom: 8px; font-weight: 800; }
.comment-form textarea { width: 100%; resize: vertical; padding: 16px; border: 1px solid var(--line); border-radius: 14px; outline: none; background: #fff; }
.comment-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(239,107,73,.12); }
.comment-form > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 12px; }
.comment-form small { color: var(--muted); }
.login-invite { display: flex; align-items: center; gap: 10px; margin-top: 28px; padding: 22px; background: #eceae4; border-radius: 16px; }
.login-invite > div { margin-right: auto; }
.login-invite b { font-size: 18px; }
.login-invite p { margin: 3px 0 0; color: var(--muted); }

.author-hero {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 46px;
  align-items: start;
  padding: 100px 0 65px;
}
.author-hero__avatar .avatar { width: 140px; height: 140px; }
.author-hero h1 { margin: 10px 0 0; font-size: clamp(46px, 6vw, 74px); }
.author-hero__username { margin: 10px 0; color: var(--muted); font-weight: 750; }
.author-hero blockquote { margin: 20px 0; padding-left: 18px; border-left: 3px solid var(--accent); font-family: Georgia, serif; font-size: 22px; }
.author-hero > div:last-child > p:last-child { max-width: 720px; color: var(--muted); font-size: 18px; }

.flash-stack { position: fixed; z-index: 120; top: 94px; right: 18px; display: grid; gap: 10px; width: min(390px, calc(100% - 36px)); }
.flash { padding: 14px 17px; color: #fff; border-radius: 13px; box-shadow: var(--shadow); }
.flash--success { background: var(--success); }
.flash--error { background: var(--error); }

.site-footer { margin-top: 110px; padding: 65px 0; color: #dbe2df; background: #111916; }
.site-footer__inner { width: min(calc(100% - 40px), var(--max)); margin: auto; display: flex; justify-content: space-between; gap: 40px; }
.site-footer b { color: #fff; font-size: 22px; }
.site-footer p { margin: 8px 0 0; color: #9eada7; }
.site-footer__meta { display: grid; align-content: start; justify-items: end; gap: 5px; color: #9eada7; font-size: 13px; text-align: right; }

@media (max-width: 980px) {
  .site-header__inner { grid-template-columns: 1fr auto; }
  .site-menu-button { display: inline-flex; align-items: center; justify-content: center; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; font-weight: 800; }
  .site-navigation { position: absolute; top: 78px; right: 20px; left: 20px; display: none; padding: 15px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); box-shadow: var(--shadow); }
  .site-navigation.is-open { display: grid; }
  .site-navigation a { padding: 11px 8px; }
  .site-navigation a::after { display: none; }
  .site-account { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero__panel { min-height: 270px; }
  .entry-grid--posts, .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry-card--lead { grid-column: span 2; }
}

@media (max-width: 700px) {
  .site-header__inner { width: min(calc(100% - 24px), var(--max)); min-height: 68px; }
  .site-brand__logo { width: 36px; height: 36px; }
  .site-brand__text small { display: none; }
  .site-navigation { top: 68px; right: 12px; left: 12px; }
  .hero { width: calc(100% - 20px); margin-top: 10px; border-radius: 22px; }
  .hero__content { padding: 48px 25px; }
  .hero h1, .archive-hero h1, .single-entry__header h1, .author-hero h1 { font-size: 46px; }
  .hero__panel { min-height: 230px; padding: 28px; }
  .hero__panel b { font-size: 26px; }
  .content-section { width: calc(100% - 24px); margin: 70px auto; }
  .content-section--contrast { width: 100%; padding: 70px 12px; }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; }
  .entry-grid--posts, .portfolio-grid { grid-template-columns: 1fr; }
  .entry-card--lead { grid-column: auto; }
  .entry-card { min-height: 280px; padding: 24px; }
  .entry-card--lead h3, .entry-card h3 { font-size: 32px; }
  .portfolio-card { min-height: 290px; }
  .statement { width: calc(100% - 24px); margin: 85px auto; }
  .archive-hero { width: calc(100% - 24px); padding: 70px 0 30px; }
  .archive-item { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
  .archive-item__arrow { display: none; }
  .archive-item h2 { font-size: 31px; }
  .single-entry { padding-top: 50px; }
  .single-entry__header { width: calc(100% - 24px); }
  .single-entry__lead { font-size: 18px; }
  .single-entry__meta { flex-direction: column; gap: 10px; }
  .single-entry__body { width: calc(100% - 28px); margin: 50px auto; }
  .prose { font-size: 19px; line-height: 1.72; }
  .prose h2 { font-size: 31px; }
  .prose blockquote { margin: 1.8em 0; padding: 22px; font-size: 23px; }
  .single-entry__footer { width: calc(100% - 24px); }
  .author-card { grid-template-columns: 58px minmax(0, 1fr); padding: 22px 0; }
  .author-card .avatar { width: 56px; height: 56px; }
  .interaction-section, .comments-section { width: calc(100% - 20px); margin: 45px auto; padding: 24px; }
  .comment-form > div, .login-invite { align-items: stretch; flex-direction: column; }
  .login-invite > div { margin-right: 0; }
  .author-hero { width: calc(100% - 24px); grid-template-columns: 1fr; gap: 24px; padding: 70px 0 25px; }
  .author-hero__avatar .avatar { width: 100px; height: 100px; }
  .site-footer { margin-top: 75px; padding: 50px 0; }
  .site-footer__inner { width: calc(100% - 24px); flex-direction: column; }
  .site-footer__meta { justify-items: start; text-align: left; }
}
