:root {
  --accent: #bce734;
  --accent-dark: #1e2c0d;
  --background: #f4f2ea;
  --border: #d7d4c8;
  --ink: #17201e;
  --muted: #66706d;
  --paper: #fffef9;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}

body {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-color: #8ba831;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: var(--ink);
}

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding-left: clamp(1.25rem, 4vw, 3rem);
  padding-right: clamp(1.25rem, 4vw, 3rem);
}

.site-header {
  background: var(--ink);
  color: white;
}

.header-inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 5rem;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-size: 1.05rem;
  font-weight: 750;
  gap: 0.65rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.4rem;
}

nav {
  display: flex;
  gap: clamp(0.85rem, 3vw, 2rem);
}

nav a {
  color: #dfe3df;
  font-size: 0.9rem;
  text-decoration: none;
}

nav a:hover {
  color: var(--accent);
}

.account-menu {
  align-items: center;
  color: #dfe3df;
  display: flex;
  font-size: 0.8rem;
  gap: 0.8rem;
}

.account-menu details {
  position: relative;
}

.account-menu summary {
  cursor: pointer;
}

.account-options {
  background: var(--paper);
  border: 1px solid var(--border);
  color: var(--ink);
  min-width: 12rem;
  padding: 0.4rem;
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 10;
}

.account-options form,
.account-options button {
  width: 100%;
}

.account-options button,
.link-button {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0.35rem 0.5rem;
  text-align: left;
}

.account-options button:disabled {
  color: var(--muted);
  cursor: default;
}

.link-button {
  padding: 0;
  text-decoration: underline;
  text-decoration-color: #8ba831;
  text-underline-offset: 0.18em;
}

.flash {
  background: var(--paper);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  max-width: 42rem;
  padding: 0.75rem 1rem;
}

.flash.alert {
  border-color: #a44141;
}

.auth-card {
  background: var(--paper);
  border: 1px solid var(--border);
  max-width: 32rem;
  padding: clamp(1.5rem, 5vw, 3rem);
}

.auth-card h1 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 0;
}

.auth-card > p:not(.eyebrow) {
  color: var(--muted);
  margin: 1.25rem 0 2rem;
}

.auth-form,
.field {
  display: grid;
  gap: 0.5rem;
}

.auth-form {
  gap: 1.25rem;
}

.field label {
  font-size: 0.8rem;
  font-weight: 750;
}

.field input {
  background: white;
  border: 1px solid #aaa99f;
  border-radius: 0;
  color: var(--ink);
  font: inherit;
  padding: 0.75rem;
  width: 100%;
}

.auth-form .button {
  border: 0;
  cursor: pointer;
  justify-self: start;
}

.page-content {
  min-height: calc(100vh - 10rem);
  padding-bottom: clamp(4rem, 8vw, 8rem);
  padding-top: clamp(3rem, 7vw, 7rem);
}

.content-grid {
  display: grid;
  gap: clamp(3rem, 8vw, 7rem);
  grid-template-columns: minmax(0, 1fr) minmax(13rem, 18rem);
}

.eyebrow {
  color: #617724;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0 0 0.7rem;
  text-transform: uppercase;
}

.post-header h1,
.page-header h1 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
  margin: 0;
}

.post-header h1 a {
  text-decoration: none;
}

.post-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 1.35rem 0 0;
}

.prose {
  font-family: var(--serif);
  font-size: clamp(1.12rem, 2vw, 1.3rem);
  line-height: 1.78;
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  max-width: 44rem;
}

.prose h2,
.prose h3 {
  line-height: 1.2;
  margin-top: 2em;
}

.prose pre {
  background: var(--ink);
  color: #f7f8f2;
  overflow-x: auto;
  padding: 1.25rem;
}

.prose code {
  font-size: 0.88em;
}

.prose img {
  height: auto;
  max-width: 100%;
}

.post-list {
  border-top: 3px solid var(--ink);
  padding-top: 1.2rem;
}

.post-list ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list li {
  align-items: baseline;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.post-list li:first-child {
  border-top: 0;
}

.post-list time {
  color: var(--muted);
  font-size: 0.75rem;
}

.empty-state {
  max-width: 42rem;
}

.empty-state h1 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-weight: 500;
  line-height: 1;
  margin: 0;
}

.page-header {
  max-width: 52rem;
}

.page-header > p:last-child {
  color: var(--muted);
  font-size: 1.15rem;
  margin-top: 1.5rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  margin-top: 3.5rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--border);
  display: block;
  min-height: 18rem;
  padding: 1.5rem;
  text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease;
}

.card:hover {
  border-color: #94b52d;
  transform: translateY(-4px);
}

.card-number {
  color: #789323;
  font-size: 0.75rem;
  font-weight: 800;
}

.card h2 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.05;
  margin: 3.7rem 0 1rem;
}

.card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  padding: 1.5rem 0;
}

.resume-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.button {
  background: var(--ink);
  color: white;
  display: inline-block;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.7rem 1rem;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
}

.resume {
  background: var(--paper);
  border: 1px solid var(--border);
  margin-top: 3rem;
  max-width: 58rem;
  padding: clamp(1.5rem, 5vw, 4rem);
}

.resume-contact {
  display: flex;
  flex-wrap: wrap;
  font-style: normal;
  gap: 0.35rem 1.25rem;
  margin-bottom: 2.5rem;
}

.resume-contact a {
  color: inherit;
}

.resume h2 {
  border-bottom: 2px solid var(--ink);
  font-family: var(--serif);
  font-size: 1.6rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.35rem;
}

.resume h2:first-of-type {
  margin-top: 0;
}

.resume h3 {
  font-size: 1rem;
  margin: 0;
}

.resume .role {
  color: var(--muted);
  margin: 0.15rem 0 0.75rem;
}

.resume .job {
  margin-top: 1.7rem;
}

.resume .job-heading {
  align-items: baseline;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.resume .date {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
    justify-content: center;
    padding-bottom: 1rem;
    padding-top: 1rem;
  }

  .account-menu {
    flex-wrap: wrap;
  }

  nav {
    flex-wrap: wrap;
  }

  .content-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: 13rem;
  }

  .card h2 {
    margin-top: 2.5rem;
  }

  .resume .job-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
}

@media print {
  .site-header,
  .site-footer,
  .page-header,
  .resume-actions {
    display: none;
  }

  .page-content,
  .resume {
    border: 0;
    margin: 0;
    max-width: none;
    padding: 0;
  }
}
