:root {
  color-scheme: light;
  --ink: #17231f;
  --muted: #5e6c65;
  --accent: #28745d;
  --line: #dfe7e2;
  --paper: #fbfcfa;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
main { width: min(760px, calc(100% - 40px)); margin: 0 auto; padding: 80px 0 56px; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2.4rem, 8vw, 4rem); line-height: 1.1; letter-spacing: -.045em; }
.intro { max-width: 610px; margin: 20px 0 26px; color: var(--muted); font-size: 1.15rem; }
.availability { display: flex; align-items: flex-start; gap: 8px; max-width: 650px; margin: 0 0 22px; color: var(--ink); font-size: .92rem; }
.availability span { width: 9px; height: 9px; flex: 0 0 9px; margin-top: .48em; border-radius: 50%; background: #3b9b68; box-shadow: 0 0 0 4px #e4f2e9; }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-bottom: 54px; }
a { color: var(--accent); text-underline-offset: 4px; }
.links a { font-weight: 650; text-decoration: none; }
.links .cv-link { padding: 7px 12px; border-radius: 6px; background: var(--ink); color: white; }
.links .cv-link:hover, .links .cv-link:focus-visible { background: var(--accent); }
.showcase-trigger, .tab-button, .close-button { font: inherit; cursor: pointer; }
.showcase-trigger { padding: 7px 12px; border: 1px solid var(--accent); border-radius: 6px; background: transparent; color: var(--accent); font-weight: 650; }
.showcase-trigger:hover, .showcase-trigger:focus-visible { background: var(--accent); color: white; }
section { border-top: 1px solid var(--line); padding: 28px 0; }
h2 { margin: 0 0 16px; font-size: 1.15rem; }
ul { margin: 0; padding-left: 1.2rem; }
li { padding: 4px 0 4px 4px; }
li::marker { color: var(--accent); }
.muted, .skills { color: var(--muted); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.section-heading .eyebrow { margin-bottom: 4px; }
.section-heading h2 { margin-bottom: 16px; }
.writing > .muted { margin: 0 0 18px; }
.writing-all { flex: 0 0 auto; margin-bottom: 16px; font-size: .9rem; font-weight: 650; text-decoration: none; }
.writing-list { display: grid; gap: 0; }
.writing-item { padding: 16px 0; border-top: 1px solid var(--line); }
.writing-item:last-child { padding-bottom: 2px; }
.writing-item time { color: var(--accent); font-size: .77rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.writing-item h3 { margin: 3px 0 4px; font-size: 1rem; line-height: 1.4; }
.writing-item h3 a { color: var(--ink); text-decoration-color: transparent; }
.writing-item h3 a:hover, .writing-item h3 a:focus-visible { color: var(--accent); text-decoration-color: currentColor; }
.writing-item p { margin: 0; color: var(--muted); font-size: .9rem; }
.blog-page { padding-top: 52px; }
.back-link { display: inline-block; margin-bottom: 38px; font-size: .9rem; font-weight: 650; text-decoration: none; }
.writing-header { border: 0; padding: 0 0 20px; }
.writing-header h1 { margin-bottom: 12px; font-size: clamp(2.4rem, 8vw, 4rem); }
.writing-index { border-top: 1px solid var(--line); }
.writing-index .writing-item h2 { margin: 3px 0 4px; font-size: 1.1rem; line-height: 1.4; }
.writing-index .writing-item h2 a { color: var(--ink); text-decoration-color: transparent; }
.writing-index .writing-item h2 a:hover, .writing-index .writing-item h2 a:focus-visible { color: var(--accent); text-decoration-color: currentColor; }
.post { max-width: 720px; }
.post > h1 { font-size: clamp(2rem, 6vw, 3.3rem); }
.post-summary { margin: 16px 0 38px; color: var(--muted); font-size: 1.12rem; }
.post-content { color: #26352e; }
.post-content h1, .post-content h2, .post-content h3, .post-content h4 { margin: 38px 0 12px; line-height: 1.25; letter-spacing: -.02em; }
.post-content h1 { font-size: 1.65rem; }
.post-content h2 { font-size: 1.35rem; }
.post-content h3 { font-size: 1.12rem; }
.post-content p { margin: 0 0 18px; }
.post-content ul { margin: 0 0 18px; }
.post-content li { padding-bottom: 2px; }
.post-content img { display: block; width: 100%; max-width: 680px; height: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: 8px; }
.missing-media { display: inline-block; margin: 4px 0; color: var(--muted); font-size: .9rem; font-style: italic; }
.post-content pre { margin: 20px 0; padding: 16px; overflow-x: auto; border-radius: 8px; background: #18241f; color: #eaf3ee; font: .85rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.post-content :not(pre) > code { padding: .12em .34em; border-radius: 4px; background: #eaf3ee; font-size: .88em; }
.post-content blockquote { margin: 20px 0; padding: 2px 0 2px 16px; border-left: 3px solid var(--accent); color: var(--muted); }
.post-content hr { margin: 32px 0; border: 0; border-top: 1px solid var(--line); }
.table-wrap { margin: 20px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.post-content table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.post-content th, .post-content td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.post-content th { background: #f1f6f2; color: var(--ink); }
.post-content tr:last-child td { border-bottom: 0; }
footer { border-top: 1px solid var(--line); padding-top: 20px; color: var(--muted); font-size: .9rem; }
footer p { margin: 0 0 12px; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .78rem; }
.visitor-count { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: .86rem; font-weight: 650; }
.visitor-count img { display: block; width: 100px; height: 40px; vertical-align: middle; }

.featured-work-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 18px; }
.featured-work-heading .eyebrow { margin-bottom: 4px; }
.featured-work-heading h2 { margin: 0; }
.text-button { flex: 0 0 auto; padding: 6px 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: .9rem; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.text-button:hover, .text-button:focus-visible { color: var(--ink); }
.featured-work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.featured-work .project-card { border-radius: 8px; }
.featured-work .project-card img,
.featured-work .project-card video { aspect-ratio: 4 / 3; object-fit: cover; }
.featured-work .project-copy { padding: 12px 13px 14px; }
.featured-work .project-copy h3 { margin-bottom: 4px; }
.featured-work .project-copy .project-type { margin: 0 0 5px; color: var(--accent); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.project-impact { margin-top: 9px !important; color: var(--accent) !important; font-size: .72rem !important; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

.showcase {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(760px, 100%);
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 30px clamp(20px, 4vw, 44px) 40px;
  overflow: auto;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: -18px 0 60px rgb(20 35 29 / 14%);
}
.showcase[open] { animation: slide-in .2s ease-out; }
.showcase::backdrop { background: rgb(12 24 19 / 45%); }
@keyframes slide-in { from { transform: translateX(24px); opacity: .7; } to { transform: translateX(0); opacity: 1; } }
.showcase-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.showcase-header .eyebrow { margin-bottom: 4px; }
.showcase-header h2 { margin: 0; font-size: clamp(1.45rem, 4vw, 2rem); }
.close-button { width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font-size: 1.7rem; line-height: 1; }
.showcase-tabs { display: flex; gap: 8px; margin: 26px 0 20px; border-bottom: 1px solid var(--line); }
.tab-button { padding: 10px 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: .92rem; }
.tab-button.is-active { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.showcase-panel { border: 0; padding: 0; }
.showcase-panel[hidden] { display: none; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.project-card { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: white; }
.project-card img, .project-card video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #eef2ef; }
.project-card img.contain { object-fit: contain; padding: 14px; }
.project-copy { padding: 13px 15px 15px; }
.project-copy h3 { margin: 0 0 3px; font-size: 1rem; line-height: 1.4; }
.project-copy p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.source-list { display: grid; gap: 10px; }
.source-card { position: relative; display: block; padding: 15px 46px 15px 16px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); text-decoration: none; }
.source-card:hover, .source-card:focus-visible { border-color: var(--accent); }
.source-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; }
.source-heading h3 { margin: 0; font-size: .98rem; line-height: 1.4; }
.source-kind { padding: 2px 7px; border-radius: 99px; background: #eaf3ee; color: var(--accent); font-size: .72rem; font-weight: 650; }
.source-card p { margin: 5px 0 0; color: var(--muted); font-size: .88rem; }
.source-external { position: absolute; top: 16px; right: 16px; color: var(--accent); }
.client-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.client-card { display: grid; min-height: 108px; place-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.client-card img { display: block; width: 100%; max-width: 150px; height: 60px; object-fit: contain; }
.client-card img.dark-logo { filter: none; }
.client-card img.white-logo { filter: invert(1); }
.client-card span { margin-top: 5px; color: var(--muted); font-size: .78rem; text-align: center; }

@media (max-width: 540px) {
  main { padding-top: 52px; }
  .links { margin-bottom: 34px; }
  .showcase { padding: 22px 16px 30px; }
  .project-grid { grid-template-columns: 1fr; }
  .client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-work-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 0; }
  .writing-all { margin-bottom: 16px; }
  .featured-work-grid { grid-template-columns: 1fr; }
}
@media (min-width: 541px) and (max-width: 700px) { .featured-work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
