:root {
  --ink: #181817;
  --body: #343330;
  --muted: #6b6861;
  --accent: #8a6828;
  --accent-deep: #6f521f;
  --gold-light: #c9a45a;
  --rule: #d7d1c5;
  --paper: #ffffff;
  --canvas: #eeece7;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
  --maxw: 1080px;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
img {
  max-width: 100%;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.6rem;
}
.measure {
  max-width: 64ch;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.8rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.16rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.nav-links a {
  color: var(--body);
  text-decoration: none;
  font-size: 0.92rem;
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}
.nav-links a:hover {
  color: var(--accent-deep);
}
.nav-links a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--accent);
}
.nav-cta {
  color: var(--accent-deep) !important;
  font-weight: 700;
}

/* ---------- Shared type ---------- */
.kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.display {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.7rem, 7vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 0.5rem 0 0;
}
.section-head {
  margin-bottom: clamp(1.2rem, 3vw, 1.9rem);
}
.section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  line-height: 1.15;
  color: var(--ink);
  margin: 0.35rem 0 0;
}
.lead {
  font-size: clamp(1.1rem, 1.9vw, 1.28rem);
  line-height: 1.5;
  color: var(--ink);
}

.section {
  padding: clamp(2.4rem, 6vw, 4.2rem) 0;
}
.section--tint {
  background: var(--canvas);
}
.section + .section:not(.section--tint) {
  border-top: 1px solid var(--rule);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 0.72rem 1.4rem;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-deep);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--muted);
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent-deep);
}

/* ---------- Hero ---------- */
.hero {
  background: var(--canvas);
  padding: clamp(2.4rem, 6vw, 4.2rem) 0;
}
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.6rem, 4vw, 3.4rem);
}
.hero-text {
  flex: 1 1 auto;
  min-width: 0;
}
.hero .lead {
  margin: 1.1rem 0 0;
  max-width: 40ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}
.hero-photo {
  flex: 0 0 auto;
  margin: 0;
}
.hero-photo img {
  display: block;
  width: clamp(200px, 24vw, 290px);
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
  border: 1px solid var(--rule);
  box-shadow: 0 12px 34px rgba(24, 24, 23, 0.18);
}
.page-hero {
  background: var(--canvas);
  padding: clamp(2.4rem, 6vw, 4rem) 0;
}
.page-hero .lead {
  margin: 1rem 0 0;
}

/* ---------- Stats ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(1.2rem, 3vw, 2.4rem);
}
.stat-num {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  color: var(--accent-deep);
  line-height: 1;
}
.stat-label {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

/* ---------- Skills grid ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem 1.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.skills-grid li {
  position: relative;
  padding-left: 1.05rem;
  font-size: 0.96rem;
  color: var(--body);
}
.skills-grid li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Experience ---------- */
.exp {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(1rem, 3vw, 2.6rem);
  padding: 1.9rem 0;
}
.exp:first-of-type {
  padding-top: 0;
}
.exp + .exp {
  border-top: 1px solid var(--rule);
}
.exp-company {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.32rem;
  color: var(--ink);
  margin: 0;
}
.exp-dates {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.3rem 0 0;
  font-variant-numeric: tabular-nums;
}
.exp-note {
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
  margin: 0.35rem 0 0;
}
.role + .role {
  margin-top: 1.2rem;
}
.role-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.role-dates {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0.1rem 0 0;
}
ul.points {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
}
ul.points li {
  position: relative;
  padding-left: 1.15rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--body);
}
ul.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
ul.points strong {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- Inline lists + simple blocks ---------- */
.inline-list {
  font-size: 0.98rem;
  color: var(--body);
  line-height: 1.7;
  margin: 0;
}
.stack p {
  margin: 0;
}
.stack p + p {
  margin-top: 0.35rem;
}
.degree,
.organization {
  color: var(--ink);
  font-weight: 700;
}
.detail {
  font-size: 0.96rem;
  color: var(--body);
}
.muted-detail {
  font-size: 0.93rem;
  color: var(--muted);
  margin-top: 0.4rem;
}
.dates-inline {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}
.compact-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem 1.2rem;
}
.community-item + .community-item {
  margin-top: 1.3rem;
}

/* ---------- Case studies (portfolio) ---------- */
.case {
  padding: clamp(1.8rem, 4vw, 2.6rem) 0;
}
.case:first-of-type {
  padding-top: 0;
}
.case + .case {
  border-top: 1px solid var(--rule);
}
.case-kicker {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 0.35rem;
  letter-spacing: 0.02em;
}
.case-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  color: var(--ink);
  margin: 0 0 0.7rem;
}
.case p {
  margin: 0 0 0.7rem;
}
.case .label {
  font-weight: 700;
  color: var(--ink);
}
.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
.metric {
  background: var(--canvas);
  border: 1px solid var(--rule);
  padding: 0.32rem 0.72rem;
  font-size: 0.82rem;
  color: var(--ink);
}

/* ---------- Gallery placeholders ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.tile {
  aspect-ratio: 4 / 3;
  background: var(--canvas);
  border: 1px dashed var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1rem;
}

/* ---------- Principles (about) ---------- */
.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.4rem;
}
.principle h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--ink);
  margin: 0 0 0.4rem;
}
.principle p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--body);
}

.bio p {
  max-width: 60ch;
}
.bio p + p {
  margin-top: 1rem;
}
.about-grid {
  display: flex;
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: flex-start;
}
.about-grid .bio {
  flex: 1 1 auto;
  min-width: 0;
}
.about-photo {
  flex: 0 0 auto;
  margin: 0;
}
.about-photo img {
  display: block;
  width: clamp(190px, 22vw, 260px);
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
  border: 1px solid var(--rule);
  box-shadow: 0 12px 30px rgba(24, 24, 23, 0.16);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #cfcabd;
  padding: clamp(2.4rem, 5vw, 3.4rem) 0 1.6rem;
  margin-top: clamp(2.4rem, 5vw, 3.6rem);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 3rem;
  justify-content: space-between;
}
.footer-word {
  font-family: var(--serif);
  color: #fff;
  font-size: 1.25rem;
  margin: 0;
}
.footer-tag {
  color: #a9a396;
  font-size: 0.9rem;
  margin: 0.25rem 0 0;
}
.footer-col h4 {
  color: #8f897c;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.7rem;
  font-weight: 700;
}
.footer-col a {
  color: #e6e2d7;
  text-decoration: none;
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.93rem;
}
.footer-col a:hover {
  color: var(--gold-light);
}
.colophon {
  color: #8b8578;
  font-size: 0.8rem;
  margin: 1.8rem 0 0;
  border-top: 1px solid #2f2e2b;
  padding-top: 1.2rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-text,
  .page-hero .container {
    opacity: 0;
    transform: translateY(10px);
    animation: rise 0.6s ease forwards;
  }
  @keyframes rise {
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .exp {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  body {
    font-size: 16px;
  }
  .hero-inner {
    flex-direction: column-reverse;
    align-items: flex-start;
  }
  .hero-photo img {
    width: 150px;
  }
  .about-grid {
    flex-direction: column-reverse;
    align-items: flex-start;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .gallery {
    grid-template-columns: 1fr;
  }
  .nav-inner {
    justify-content: center;
  }
  .nav-links {
    gap: 1rem;
    font-size: 0.88rem;
  }
}

@media print {
  .nav,
  .hero-cta,
  .site-footer {
    display: none;
  }
  body {
    background: #fff;
  }
  a {
    color: inherit;
  }
}

/* ---------- Case study cards (portfolio) ---------- */
.cs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}
.cs-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  padding: 1.5rem 1.6rem 1.4rem;
  text-decoration: none;
  color: var(--body);
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease;
}
.cs-card:hover,
.cs-card:focus-visible {
  box-shadow: 0 10px 28px rgba(24, 24, 23, 0.1);
  transform: translateY(-2px);
}
.cs-card h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.25;
  color: var(--ink);
  margin: 0.45rem 0 0.6rem;
}
.cs-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--body);
}
.cs-card .read {
  margin-top: auto;
  padding-top: 1.1rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-deep);
}

/* ---------- Case study pages ---------- */
.back-link {
  display: inline-block;
  margin-bottom: 1.4rem;
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
}
.back-link:hover {
  color: var(--accent-deep);
}
.case-h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.1;
  color: var(--ink);
  margin: 0.5rem 0 0;
  max-width: 24ch;
}
.outcome {
  margin: 1.3rem 0 0;
  max-width: 60ch;
  padding-left: 1rem;
  border-left: 4px solid var(--accent);
  font-size: 1.12rem;
  line-height: 1.5;
  color: var(--ink);
}
.case-body {
  max-width: 70ch;
}
.case-body h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ink);
  margin: 2.4rem 0 0.6rem;
}
.case-body h3:first-child {
  margin-top: 0;
}
.case-body p {
  margin: 0 0 1rem;
}
.case-body ul,
.case-body ol:not(.stages) {
  padding-left: 1.2rem;
  margin: 0 0 1rem;
}
.case-body li {
  margin-bottom: 0.6rem;
}
.case-body a {
  color: var(--accent-deep);
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin: 1.6rem 0;
}
.compare section {
  padding: 1.1rem 1.2rem;
}
.compare .before {
  background: var(--canvas);
}
.compare .after {
  background: #f4ecdb;
}
.compare h4 {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.compare .before h4 {
  color: var(--muted);
}
.compare .after h4 {
  color: var(--accent-deep);
}
.compare ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.92rem;
}

.log-wrap {
  overflow-x: auto;
  margin: 1.5rem 0 0.5rem;
}
table.log {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 0.88rem;
  line-height: 1.45;
}
table.log caption {
  text-align: left;
  font-size: 0.85rem;
  color: var(--muted);
  padding-bottom: 0.6rem;
}
table.log th {
  text-align: left;
  font-weight: 700;
  color: var(--accent-deep);
  border-bottom: 2px solid var(--ink);
  padding: 0.5rem 0.75rem 0.5rem 0;
}
table.log td {
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
  padding: 0.7rem 0.75rem 0.7rem 0;
}
table.log td:first-child {
  font-weight: 700;
  color: var(--ink);
  width: 32%;
}

.stages {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 1rem;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  counter-reset: stage;
}
.stages li {
  counter-increment: stage;
  background: var(--canvas);
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.25;
  padding: 0.7rem 0.5rem 0.8rem;
  margin: 0;
  min-height: 5.2rem;
}
.stages li::before {
  content: counter(stage);
  display: block;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.stages li.dip {
  background: var(--accent);
  color: #fff;
}
.stages li.dip::before {
  color: #fff;
}
.stages-note {
  font-size: 0.85rem;
  color: var(--muted);
}

figure.placeholder {
  margin: 2rem 0;
  border: 2px dashed var(--rule);
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
figure.placeholder img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Unfinished details: easy to spot, easy to delete before publishing */
.todo {
  background: #fff1c2;
  padding: 0.1rem 0.3rem;
  font-style: italic;
}

.case-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding-top: 1.4rem;
}
.case-pager a {
  text-decoration: none;
  max-width: 48%;
}
.case-pager .dir {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.case-pager .ttl {
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  margin-top: 0.2rem;
}
.case-pager a:hover .ttl {
  color: var(--accent-deep);
}
.case-pager .next {
  text-align: right;
  margin-left: auto;
}

@media (max-width: 760px) {
  .cs-grid {
    grid-template-columns: 1fr;
  }
  .compare {
    grid-template-columns: 1fr;
  }
  .stages {
    grid-template-columns: repeat(2, 1fr);
  }
  .stages li {
    min-height: auto;
  }
  .case-pager a {
    max-width: 100%;
  }
}
.cs-card .kicker {
  color: var(--accent);
  font-size: 0.74rem;
}
.cs-card:first-child {
  grid-column: 1 / -1;
}
.cs-card:first-child h2 {
  font-size: 1.6rem;
  max-width: 30ch;
}

/* ---------- Case study images ---------- */
figure.shot {
  margin: 2rem 0;
}
figure.shot img,
.slide-grid img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  box-shadow: 0 8px 24px rgba(24, 24, 23, 0.1);
}
figure.shot.narrow img {
  max-width: 420px;
  margin: 0 auto;
}
figure.shot.medium img {
  max-width: 560px;
  margin: 0 auto;
}
figure.shot figcaption,
figure.slides figcaption {
  margin-top: 0.7rem;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
}
figure.shot.narrow figcaption,
figure.shot.medium figcaption {
  text-align: center;
}
figure.slides {
  margin: 2rem 0;
}
.slide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
.slide-grid a:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: calc(50% - 0.45rem);
  justify-self: center;
}
.zoom-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--accent-deep);
}

/* Recreated empty-state mockup */
.state-compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0 0.6rem;
}
.state {
  border: 1px solid var(--rule);
  background: #fff;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
}
.state h4 {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.state.after h4 {
  color: var(--accent-deep);
}
.mock-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid #e3e8ec;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 0.9rem;
  font-size: 0.85rem;
  color: #4a4a4a;
  line-height: 1.4;
  min-height: 6.5rem;
}
.mock-card .bell {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  color: #7aa9c9;
}
.mock-card.empty {
  border-style: dashed;
  box-shadow: none;
  justify-content: center;
  color: #b0b0b0;
  font-style: italic;
}
.mock-card .cta {
  display: block;
  margin-top: 0.4rem;
  color: #7aa9c9;
  font-weight: 700;
}
.state-note {
  font-size: 0.86rem;
  color: var(--muted);
}

@media (max-width: 760px) {
  .slide-grid {
    grid-template-columns: 1fr;
  }
  .slide-grid a:last-child:nth-child(odd) {
    max-width: 100%;
  }
  .state-compare {
    grid-template-columns: 1fr;
  }
}

/* ---------- Case study links on the home page ---------- */
.cs-link {
  white-space: nowrap;
  margin-left: 0.25rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-deep);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.cs-link:hover,
.cs-link:focus-visible {
  border-color: var(--accent);
}

/* ---------- Image lightbox ---------- */
.zoomable,
.zoomable img {
  cursor: zoom-in;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  padding: 4.2rem 1.2rem 2.4rem;
  background: rgba(18, 18, 17, 0.9);
}
.lightbox[hidden] {
  display: none;
}
.lightbox-fig {
  margin: auto;
  max-width: 1200px;
  text-align: center;
}
.lightbox-fig img {
  display: block;
  margin: 0 auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 82vh;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.lightbox-fig img.tall {
  max-height: none;
}
.lightbox-fig figcaption {
  max-width: 62ch;
  margin: 0.9rem auto 0;
  color: #e6e2d7;
  font-size: 0.9rem;
  line-height: 1.5;
}
.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 101;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
}
body.lb-open {
  overflow: hidden;
}

/* ---------- Creative work cards (portfolio) ---------- */
.cr-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}
.cr-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--rule);
  text-decoration: none;
  color: var(--body);
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease;
}
.cr-card:hover,
.cr-card:focus-visible {
  box-shadow: 0 10px 28px rgba(24, 24, 23, 0.1);
  transform: translateY(-2px);
}
.cr-thumb {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--canvas);
  border-bottom: 3px solid var(--accent);
}
.cr-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.cr-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.2rem 1.3rem 1.2rem;
}
.cr-text .kicker {
  color: var(--accent);
  font-size: 0.72rem;
}
.cr-title {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--ink);
  margin: 0.4rem 0 0.5rem;
}
.cr-desc {
  display: block;
  font-size: 0.93rem;
}
.cr-card .read {
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-deep);
}

/* ---------- Creative pages ---------- */
.creative-body > p {
  font-size: 1.02rem;
  line-height: 1.7;
}
.slide-grid.pages {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.slide-grid.pages a:last-child:nth-child(odd) {
  grid-column: auto;
  max-width: none;
  justify-self: stretch;
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.pair figure.shot {
  margin: 1rem 0;
}

@media (max-width: 860px) {
  .cr-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 620px) {
  .cr-grid {
    grid-template-columns: 1fr;
  }
  .slide-grid.pages {
    grid-template-columns: 1fr 1fr;
  }
  .pair {
    grid-template-columns: 1fr;
  }
}

/* How I work: line the headings up on a shared baseline so every description starts at the same height */
.principles {
  grid-auto-rows: auto;
}
.principle {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  row-gap: 0;
}
.principle h3 {
  align-self: end;
}
