:root {
  --bg: #F9F7F0; --ink: #16150f; --soft: #4c4a42; --muted: #7d7970;
  --line: #e3dfd4; --accent: #257420; --onaccent: #0d0d0d; --chipbg: #f1eee4; --hair: #ece8dd;
}
html[data-theme="dark"] {
  --bg: #121211; --ink: #ffffff; --soft: #d6d3ca; --muted: #96938b;
  --line: #2c2b28; --accent: #3f9638; --onaccent: #ffffff; --chipbg: #1c1b19; --hair: #201f1d;
}
html, body { margin: 0; padding: 0; background: var(--bg); }
* { box-sizing: border-box; }
body {
  -webkit-font-smoothing: antialiased;
  background: var(--bg); color: var(--ink); min-height: 100vh;
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 20px; font-weight: 500;
  transition: background 240ms ease, color 240ms ease;
}
button { font-weight: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--ink); }
a.brand, a.nav-item, a.tag, a.post-card, a.more-card, a.back { text-decoration: none; }
a.brand:hover { color: var(--ink); }
::selection { background: var(--accent); color: #fff; }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.wrap { max-width: 1080px; margin: 0 auto; }
.header {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  max-width: 1080px; margin: 0 auto; padding: 26px 28px 10px;
}
.brand {
  font-family: 'Jost', system-ui, sans-serif; font-size: 14px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--ink); cursor: pointer; font-weight: 500;
}
.nav { display: flex; align-items: center; gap: 22px; flex: 1; justify-content: center; flex-wrap: wrap; }
.nav-item {
  font-family: 'Jost', system-ui, sans-serif; font-size: 14px; letter-spacing: 0.18em;
  text-transform: uppercase; cursor: pointer; padding: 4px 0;
  border: none; background: none; font: inherit;
  border-bottom: 1px solid transparent; color: var(--soft);
  transition: color 160ms ease, border-color 160ms ease;
}
.nav-item:hover { color: var(--ink); border-bottom-color: var(--accent); }
.nav-item:focus-visible { outline: none; border-bottom-color: var(--accent); }
.nav-item.on { color: var(--accent); border-bottom-color: var(--accent); }
.actions { display: flex; align-items: center; gap: 6px; }

.hamburger {
  display: none; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: none; background: none; cursor: pointer; color: var(--ink); padding: 0;
  border-radius: 8px; transition: background 160ms ease;
}
.hamburger:hover { background: var(--chipbg); }

.scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,0.42); opacity: 0; pointer-events: none;
  transition: opacity 260ms ease; z-index: 40;
}
body.drawer-open .scrim { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(82vw, 340px);
  background: var(--bg); border-left: 1px solid var(--line); z-index: 50;
  transform: translateX(100%); transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
  display: flex; flex-direction: column; padding: 22px 24px; overflow-y: auto;
}
body.drawer-open .drawer { transform: translateX(0); }
.drawer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.drawer-close {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: none; background: none; cursor: pointer; color: var(--soft); padding: 0;
  border-radius: 8px; transition: background 160ms ease, color 160ms ease;
}
.drawer-close:hover { background: var(--chipbg); color: var(--ink); }
.drawer-nav { display: flex; flex-direction: column; gap: 4px; }
.drawer-nav .nav-item {
  font-size: 14px; letter-spacing: 0.14em; padding: 14px 0; align-self: flex-start;
  border-bottom: 1px solid transparent;
}
.drawer-foot {
  margin-top: auto; padding-top: 26px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.icon-btn {
  display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border-radius: 50%; color: var(--soft); transition: background 160ms ease, color 160ms ease;
}
.icon-btn:hover { background: var(--chipbg); color: var(--ink); }
.toggle {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  width: 52px; height: 28px; margin-left: 8px; padding: 0 7px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--chipbg); cursor: pointer;
  transition: background 240ms ease, border-color 240ms ease;
}
.knob {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,0.28);
  transition: transform 280ms cubic-bezier(0.34, 1.4, 0.5, 1), background 240ms ease;
}
html[data-theme="dark"] .knob { transform: translateX(24px); }

.view { animation: riseIn 520ms ease both; }
.home { max-width: 680px; margin: 0 auto; padding: 44px 28px 110px; }
.intro { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.avatar {
  width: 96px; height: 96px; object-fit: cover; object-position: center top; border-radius: 50%; background: var(--chipbg);
  border: 1px solid var(--line); background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Jost', system-ui, sans-serif; font-size: 14px; letter-spacing: 0.08em; color: var(--muted);
}
.lede { margin: 0; max-width: 600px; font-size: 20px; line-height: 1.62; color: var(--soft); text-wrap: pretty; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 40px 0 60px; }
.tag {
  font-family: 'Jost', system-ui, sans-serif; font-size: 14px; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--soft);
  transition: all 160ms ease;
}
.tag.on { border-color: var(--accent); background: var(--accent); color: var(--onaccent); }

.post-list { display: flex; flex-direction: column; }
.post-card { display: flex; flex-direction: column; gap: 8px; padding: 26px 0; border-top: 1px solid var(--line); cursor: pointer; }
.post-meta {
  font-family: 'Jost', system-ui, sans-serif; font-size: 14px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); display: flex; flex-wrap: wrap; gap: 12px;
}
.post-card h2 {
  margin: 0; font-family: 'SN Pro', system-ui, sans-serif; font-weight: 500; font-size: 1.8em;
  line-height: 1.18; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance;
}
.post-card p { margin: 0; font-size: 20px; line-height: 1.58; color: var(--soft); text-wrap: pretty; }
.empty {
  padding: 60px 0; text-align: center; color: var(--muted);
  font-family: 'Jost', system-ui, sans-serif; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase;
}

.footer {
  border-top: 1px solid var(--line); margin-top: 8px; padding-top: 28px;
  font-family: 'Jost', system-ui, sans-serif; font-size: 14px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}

.article { max-width: 680px; margin: 0 auto; padding: 34px 28px 120px; }
.back {
  font-family: 'Jost', system-ui, sans-serif; font-size: 14px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); cursor: pointer; margin-bottom: 46px;
  display: inline-block; background: none; border: none; font: inherit;
}
.back:hover { color: var(--ink); }
.article h1 {
  margin: 0 0 18px; font-family: 'SN Pro', system-ui, sans-serif; font-weight: 500; font-size: 2em;
  line-height: 1.08; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance;
}
.article .dek { margin: 0 0 34px; font-size: 22px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.byline { display: flex; align-items: center; gap: 12px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.byline .mark {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--chipbg); font-family: 'Jost', system-ui, sans-serif;
  font-size: 14px; letter-spacing: 0.06em; color: var(--soft);
}
.byline .name { font-size: 16px; color: var(--ink); }
.byline .sub {
  font-family: 'Jost', system-ui, sans-serif; font-size: 14px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.figure { margin: 0 0 8px; }
.hero {
  display: block; width: 100%; height: 360px; margin-top: 40px; object-fit: cover; object-position: center 60%;
  border-radius: 4px; background: var(--chipbg); border: 1px solid var(--line);
}
.caption { margin: 12px 0 0; text-align: center; font-family: 'Jost', system-ui, sans-serif; font-size: 14px; letter-spacing: 0.1em; color: var(--muted); }
.body { font-size: 22px; font-weight: 400; line-height: 1.72; color: var(--ink); }
.body p { margin: 26px 0 0; text-wrap: pretty; }
.body p:first-child { margin-top: 40px; }
.body .drop {
  float: left; font-family: 'SN Pro', system-ui, sans-serif; font-weight: 500; font-size: 64px;
  line-height: 0.82; padding: 8px 14px 0 0; color: var(--accent);
}
.body h2 {
  margin: 48px 0 14px; font-family: 'SN Pro', system-ui, sans-serif; font-weight: 500; font-size: 1.8em;
  line-height: 1.2; letter-spacing: -0.01em;
}
.body blockquote {
  margin: 40px 0; padding: 4px 0 4px 26px; border-left: 3px solid var(--accent);
  font-family: 'Jost', system-ui, sans-serif; font-size: 25px; line-height: 1.42; font-weight: 500;
  font-style: italic; color: var(--ink);
}
.body ul { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 12px; }
.body li { text-wrap: pretty; }
.body strong { font-weight: 600; }
.rule { display: flex; justify-content: center; gap: 10px; margin: 52px 0; color: var(--muted); font-size: 20px; letter-spacing: 0.5em; }

.page .footer { margin-top: 72px; }
.work-list { display: flex; flex-direction: column; }
.work-item { display: flex; flex-direction: column; gap: 8px; padding: 26px 0; border-top: 1px solid var(--line); }
.work-item h2 {
  margin: 0; font-family: 'SN Pro', system-ui, sans-serif; font-weight: 500; font-size: 1.8em;
  line-height: 1.18; letter-spacing: -0.01em; color: var(--ink);
}
.work-item p { margin: 0; font-size: 20px; line-height: 1.58; color: var(--soft); text-wrap: pretty; }

.more { margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--line); }
.more-title {
  font-family: 'Jost', system-ui, sans-serif; font-size: 14px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.more-card { display: flex; flex-direction: column; gap: 4px; padding: 20px 0; border-bottom: 1px solid var(--hair); cursor: pointer; }
.more-card h3 { margin: 0; font-family: 'SN Pro', system-ui, sans-serif; font-weight: 500; font-size: 1.8em; line-height: 1.2; color: var(--ink); }
.more-card span {
  font-family: 'Jost', system-ui, sans-serif; font-size: 14px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}

@media (max-width: 760px) {
  .header { padding: 22px 20px 10px; }
  .nav, .actions { display: none; }
  .hamburger { display: flex; }
  .home { padding: 40px 22px 90px; }
  .article { padding: 30px 22px 100px; }
  .article h1 { font-size: 2em; }
  .article .dek { font-size: 20px; }
  .body { font-size: 20px; }
  .hero { height: 240px; }
}
