: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; }
.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; }
.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); }
footer { border-top: 1px solid var(--line); padding-top: 20px; color: var(--muted); font-size: .9rem; }

.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 { aspect-ratio: 4 / 3; }
.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; }

.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; }
  .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; } }
