/* uxdfolio on Cloudflare Pages. Sizes follow the original Squarespace design. */
:root {
  /* Theme: Quiet Editorial. Warm paper, ink, clay accent. */
  --bg: #F7F5F1;
  --text: #2A2826;
  --heading: #161616;
  --muted: #5F5B55;
  --accent: #A34A24;
  --accent-dark: #7E3719;
  --soft: #EFEBE4;
  --dark: #1C1B19;
  --line: #E2DDD4;
  --card: rgba(247, 245, 241, 0.95);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --scale: 1;
  /* Squarespace-style fluid type: size = ((value - 1) * k + 1rem) * user text scale */
  --k: min(1.2vw, 16px);
  --gutter: 10vw;
  --header-x: 4vw;
  --fs-small: calc((0.1 * var(--k) + 1rem) * var(--scale));
  --fs-body: calc((0.4 * var(--k) + 1rem) * var(--scale));
  --fs-large: calc((0.8 * var(--k) + 1rem) * var(--scale));
  --fs-h4: calc((0.6 * var(--k) + 1rem) * var(--scale));
  --fs-h3: calc((1.2 * var(--k) + 1rem) * var(--scale));
  --fs-h2: calc((1.6 * var(--k) + 1rem) * var(--scale));
  --fs-h1: calc((3 * var(--k) + 1rem) * var(--scale));
  --readw: 1000px;
}
@media (max-width: 767px) {
  :root { --k: 2.6vw; --header-x: 6vw; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4 { color: var(--heading); font-weight: 600; margin: 1.4em 0 .5em; letter-spacing: -0.005em; }
h1 { font-size: var(--fs-h1); line-height: 1.2; }
h2 { font-size: var(--fs-h2); line-height: 1.31; }
h3 { font-size: var(--fs-h3); line-height: 1.33; }
h4 { font-size: var(--fs-h4); line-height: 1.35; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--heading); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap { padding-left: var(--gutter); padding-right: var(--gutter); }
.read { max-width: calc(var(--readw) + 2 * var(--gutter)); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; transition: background-color .3s ease, box-shadow .3s ease; }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; padding: clamp(18px, 3.4vw, 50px) var(--header-x); transition: padding .3s ease; }
.site-header.scrolled .bar { padding-top: 14px; padding-bottom: 14px; }
.site-header.scrolled { box-shadow: 0 1px 0 rgba(23,37,43,.06); }
.logo { display: inline-flex; align-items: center; }
.logo img { height: 21px; width: auto; }
.nav { display: flex; gap: 1.1em; font-size: var(--fs-body); }
.nav a { color: var(--accent); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.menu-btn { display: none; background: none; border: 0; padding: 8px; margin-right: -8px; cursor: pointer; color: var(--heading); }
.menu-btn svg { width: 28px; height: 28px; }
/* Pages whose first section is a full-bleed photo (About): header floats over it */
.overlay-header .site-header { position: fixed; left: 0; right: 0; background: transparent; }
.overlay-header .site-header.scrolled { background: #fff; }
@media (max-width: 767px) {
  .logo img { height: 30px; }
  .site-header .bar { padding-top: 22px; padding-bottom: 22px; }
  .menu-btn { display: block; position: relative; z-index: 2; }
  .nav { position: fixed; inset: 0; z-index: 1; background: var(--bg); flex-direction: column; align-items: center; justify-content: center; gap: .8em; font-size: 2.6rem; display: none; }
  .nav.open { display: flex; animation: navIn .25s ease; }
  .nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 8px; }
  body.menu-open { overflow: hidden; }
  body.menu-open .site-header { background: var(--bg); }
  @keyframes navIn { from { opacity: 0; } to { opacity: 1; } }
}

/* Home */
.hero { padding-top: clamp(24px, 4vw, 60px); padding-bottom: clamp(40px, 5vw, 80px); }
/* the title is sized to span the full content width, like Squarespace's auto-fit text */
.hero h1 { font-size: calc((100vw - 2 * var(--gutter)) / 7.45); line-height: 1.12; margin: 0 0 .15em; letter-spacing: -0.012em; white-space: nowrap; }
.hero .lead { font-size: var(--fs-large); color: var(--heading); margin-bottom: .55em; }
.eyebrow, .label { font-size: 16px; font-weight: 700; text-transform: uppercase; color: var(--text); letter-spacing: .01em; margin: 2.2em 0 .7em; }
.hero .eyebrow { margin-top: clamp(48px, 7vw, 110px); }
.logos { list-style: none; margin: clamp(24px, 3vw, 44px) 0 0; padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logos li { display: flex; align-items: center; justify-content: center; min-width: 0; }
.logos img { max-height: clamp(26px, 3.3vw, 50px); max-width: clamp(60px, 8vw, 118px); width: auto; height: auto; }
@media (max-width: 900px) {
  .logos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 18px; justify-items: center; }
  .logos img { max-height: 34px; max-width: 100%; }
}

.slider { position: relative; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; height: max(460px, 47vw); display: flex; align-items: flex-end; overflow: hidden; }
.slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide .card { position: relative; margin: 0 0 clamp(24px, 6.5vw, 130px) 2vw; width: max(320px, 33.6vw); max-width: calc(100% - 4vw); background: var(--card); color: #fff; padding: clamp(20px, 2vw, 30px) clamp(20px, 2vw, 28px) clamp(24px, 2.4vw, 34px); }
.slide .card h2 { color: #fff; font-size: var(--fs-h3); margin: 0 0 .45em; }
.slide .card p { font-size: calc(0.2 * var(--k) + 1rem); line-height: 1.4; margin-bottom: 1.1em; }
.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; font-size: 16px; letter-spacing: .02em; text-transform: uppercase; padding: 20px 34px; border: 0; cursor: pointer; font-family: inherit; line-height: 1.2; }
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn.ghost { background: rgba(255,255,255,.18); cursor: default; }
.slider-nav { position: absolute; right: 2vw; bottom: clamp(20px, 2.5vw, 36px); display: flex; gap: 10px; }
.slider-nav button { width: 54px; height: 54px; border-radius: 50%; border: 0; background: rgba(23,37,43,.72); color: #fff; cursor: pointer; display: grid; place-items: center; }
.slider-nav button:hover { background: rgba(23,37,43,.92); }
.slider-count { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); color: #fff; font-size: 13px; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
@media (max-width: 767px) {
  .slide { height: 174vw; align-items: flex-end; }
  .slide .card { margin: 0 4vw 18vw; width: auto; max-width: none; }
  .slider-nav { bottom: 4vw; right: 4vw; }
  .slider-nav button { width: 46px; height: 46px; }
  .slider-count { display: none; }
}

/* Page intro */
.page-head { padding-top: clamp(20px, 3vw, 48px); }
.page-head h1 { margin-top: 0; }

/* Card grid (portfolio, journal) */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 80px) clamp(24px, 3vw, 44px); margin: clamp(32px, 4vw, 64px) 0 clamp(60px, 7vw, 110px); }
@media (max-width: 700px) { .grid { grid-template-columns: 1fr; } }
.tile { text-decoration: none; color: inherit; display: block; }
.tile .thumb { aspect-ratio: 1 / 1; overflow: hidden; background: var(--soft); }
.tile .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile:hover .thumb img { transform: scale(1.03); }
.meta { font-size: 16px; font-weight: 700; text-transform: uppercase; color: var(--text); margin: 1.1em 0 .5em; letter-spacing: .01em; }
.meta .dot { margin: 0 .45em; }
.tile h2 { font-size: var(--fs-h3); margin: 0 0 .6em; }
.tile p { color: var(--muted); font-size: var(--fs-small); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile .more { color: var(--accent); font-size: var(--fs-small); text-decoration: underline; }

/* Article (case studies, journal posts) */
.article-head { padding-top: clamp(20px, 3vw, 48px); }
.article-head h1 { margin: .25em 0 .5em; }
.prose { padding-bottom: clamp(56px, 6vw, 96px); }
.prose > :first-child { margin-top: 0; }
.prose .lead { font-size: var(--fs-large); color: var(--heading); }
.prose .note { font-size: var(--fs-small); color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .45em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose figure { margin: 1.6em 0; }
.prose figure img { width: 100%; }
.prose figcaption { font-size: var(--fs-small); color: var(--muted); margin-top: .6em; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 1em; border-left: 3px solid var(--accent); font-size: var(--fs-large); color: var(--heading); }
.prose blockquote cite { display: block; font-style: normal; font-size: var(--fs-small); color: var(--muted); margin-top: .6em; }
.prose .label + h2, .prose .label + h3 { margin-top: .15em; }
.prose .label + .label { margin-top: -.2em; color: var(--muted); }
.prose .cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px 32px; margin: .8em 0 1.2em; }
.prose .cols > .col { grid-column: span var(--span, 6); min-width: 0; }
.prose .cols > .col > :first-child { margin-top: 0; }
.prose .cols figure { margin: 0 0 1em; }
@media (max-width: 767px) { .prose .cols > .col { grid-column: 1 / -1; } }
.prose .gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 1.6em 0; }
.prose .gallery figure { margin: 0; background: var(--soft); }
@media (max-width: 767px) { .prose .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.prose img { cursor: zoom-in; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; border-top: 1px solid var(--line); padding-top: 28px; padding-bottom: clamp(56px, 6vw, 96px); }
.pager a { text-decoration: none; color: var(--heading); font-weight: 600; }
.pager span { display: block; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); margin-bottom: 6px; }
.pager .next { text-align: right; }
@media (max-width: 600px) { .pager { grid-template-columns: 1fr; } .pager .next { text-align: left; } }

/* About */
.about-hero { position: relative; height: max(480px, 46.5vw); display: flex; align-items: flex-start; }
.about-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about-hero .card { position: relative; margin: clamp(90px, 9.5vw, 150px) 0 0 var(--gutter); width: min(50vw, 720px); background: rgba(234, 243, 246, .48); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); padding: clamp(18px, 2vw, 32px) clamp(18px, 2.4vw, 36px) clamp(12px, 1.4vw, 24px); }
.about-hero .card h1 { font-size: var(--fs-h2); margin: 0 0 .6em; line-height: 1.31; }
.about-body { padding-top: clamp(36px, 4vw, 64px); padding-bottom: clamp(56px, 6vw, 96px); }
.about-body .lead { font-size: var(--fs-large); color: var(--heading); }
@media (max-width: 767px) {
  .about-hero { height: auto; min-height: 118vw; align-items: flex-end; }
  .about-hero .card { margin: 96px 6vw 6vw; width: auto; background: rgba(234, 243, 246, .8); }
}

/* Leadership */
.lead-top { padding-top: clamp(20px, 3vw, 48px); padding-bottom: clamp(36px, 4vw, 64px); }
.lead-top h1 { margin-top: 0; }
.pullquote { font-family: var(--serif); font-size: var(--fs-large); text-transform: capitalize; line-height: 1.4; color: var(--text); margin: .6em 0 0 2.4vw; padding: 0; border: 0; }
.dark { background: var(--dark); color: #fff; padding-top: clamp(32px, 4vw, 64px); padding-bottom: clamp(48px, 5vw, 80px); }
.dark h2, .dark h3, .dark h4, .dark strong { color: #fff; }
.dark > :first-child { margin-top: 0; }
.dark ul { padding-left: 1.3em; }
.dark li { margin-bottom: .45em; }

/* Footer */
.collab { background: var(--soft); padding: clamp(40px, 4.4vw, 72px) 0; }
.collab .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.collab h2 { margin-top: 0; font-size: var(--fs-h3); margin-bottom: .8em; }
.collab p { color: var(--heading); }
.collab .legal { font-size: var(--fs-small); color: var(--text); margin-top: 2em; }
.collab .legal strong { display: block; font-size: 16px; text-transform: uppercase; margin-bottom: .7em; color: var(--heading); }
.map { display: block; width: 100%; aspect-ratio: 1 / 1; max-height: 420px; border: 0; filter: grayscale(1) contrast(.9) brightness(1.05); background: #dde6ea; }
@media (max-width: 767px) { .collab .wrap { grid-template-columns: 1fr; } .map { aspect-ratio: 4 / 3; } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(12,18,21,.92); display: none; align-items: center; justify-content: center; z-index: 200; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-out; }
.lightbox button { position: absolute; top: 12px; right: 12px; background: none; border: 0; color: #fff; font-size: 34px; line-height: 1; padding: 8px 14px; cursor: pointer; }

/* Login */
.lock { min-height: 60vh; display: grid; place-items: center; padding-top: 48px; padding-bottom: 72px; }
.lock-card { width: 100%; max-width: 520px; text-align: center; }
.lock-card .icon { width: 56px; height: 56px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; margin: 0 auto 18px; color: var(--accent); }
.lock-card h1 { font-size: var(--fs-h3); margin: 0 0 .5em; }
.lock-card p { color: var(--muted); }
.lock-card form { display: flex; gap: 8px; margin: 26px 0 14px; }
.lock-card input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 14px; border: 1.5px solid var(--line); border-radius: 0; color: var(--heading); }
.lock-card input:focus { border-color: var(--accent); outline: none; }
.lock-card .err { color: #b3261e; font-size: 15px; margin: 0 0 8px; }
.lock-card .alt { font-size: 15px; }
@media (max-width: 460px) { .lock-card form { flex-direction: column; } }

/* Gentle reveal on scroll (only when JS is running and motion is allowed) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.2,.65,.3,1), transform .9s cubic-bezier(.2,.65,.3,1); }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Theme: Quiet Editorial ---------- */
body { background: var(--bg); }
h1, h2, h3, h4, .hero h1, .tile h2, .pullquote { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; }
.hero h1 { font-size: calc((100vw - 2 * var(--gutter)) / 6.1); line-height: 1.02; letter-spacing: -0.015em; }
.site-header, .overlay-header .site-header.scrolled { background: var(--bg); }
.nav a { color: var(--heading); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); text-decoration-color: var(--accent); }
.eyebrow, .label, .meta { font-size: 12px; letter-spacing: .14em; font-weight: 600; color: var(--muted); }
.logos img { filter: grayscale(1); opacity: .72; transition: opacity .2s, filter .2s; }
.logos li:hover img { filter: none; opacity: 1; }
.slide .card { background: var(--card); color: var(--text); }
.slide .card h2 { color: var(--heading); }
.btn { background: var(--heading); border-radius: 999px; font-weight: 500; letter-spacing: .08em; font-size: 13px; padding: 16px 28px; }
.btn:hover { background: var(--accent); }
.btn.ghost { background: var(--line); color: var(--muted); }
.slider-nav button { background: rgba(22, 22, 22, .82); }
.collab { background: var(--soft); }
.pullquote { font-style: italic; text-transform: none; font-size: var(--fs-h3); color: var(--heading); margin: .5em 0 0; font-family: var(--display); }
.prose blockquote { border-left-color: var(--accent); font-family: var(--display); font-size: var(--fs-h4); }
.tile .thumb { border-radius: 4px; }
.lock-card .icon { background: var(--soft); color: var(--accent); }
.about-hero .card { background: rgba(247, 245, 241, .62); }
.map { aspect-ratio: 17 / 10; max-height: none; filter: grayscale(1) contrast(.92) brightness(1.04); }
.collab .wrap { align-items: center; }

/* ---------- Accessibility options ---------- */
.a11y-btn { background: none; border: 1.5px solid var(--line); border-radius: 999px; color: var(--heading); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 9px; font: 500 14px/1 var(--font); margin-left: 1.4em; }
.a11y-btn:hover { border-color: var(--heading); }
.a11y-btn svg { width: 18px; height: 18px; }
.header-tools { display: flex; align-items: center; }
.a11y-panel { position: fixed; z-index: 150; top: 76px; right: var(--header-x); width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 96px); overflow: auto; background: #fff; color: #161616; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 48px rgba(0,0,0,.14); padding: 20px; font-family: var(--font); font-size: 15px; line-height: 1.4; }
.a11y-panel[hidden] { display: none; }
.a11y-panel h2 { font: 600 17px/1.3 var(--font); margin: 0 0 4px; color: #161616; letter-spacing: 0; }
.a11y-panel p.hint { color: #555; font-size: 13px; margin: 0 0 14px; }
.a11y-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #eee; }
.a11y-row > span { font-weight: 500; }
.a11y-seg { display: inline-flex; border: 1.5px solid #cfcac2; border-radius: 999px; overflow: hidden; }
.a11y-seg button { background: #fff; color: #161616; border: 0; padding: 7px 12px; font: 600 14px/1 var(--font); cursor: pointer; min-width: 40px; }
.a11y-seg button + button { border-left: 1.5px solid #cfcac2; }
.a11y-seg button[aria-pressed="true"] { background: #161616; color: #fff; }
.a11y-switch { position: relative; width: 46px; height: 26px; border-radius: 999px; border: 1.5px solid #9a948b; background: #eee; cursor: pointer; flex: none; }
.a11y-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.a11y-switch[aria-checked="true"] { background: #161616; border-color: #161616; }
.a11y-switch[aria-checked="true"]::after { transform: translateX(20px); }
.a11y-reset { margin-top: 14px; width: 100%; background: none; border: 1.5px solid #161616; border-radius: 999px; padding: 10px; font: 600 14px/1 var(--font); color: #161616; cursor: pointer; }
.a11y-panel :focus-visible { outline: 3px solid #9A3412; outline-offset: 2px; }
@media (max-width: 767px) {
  .a11y-btn { margin-left: 0; margin-right: 10px; padding: 7px; }
  .a11y-btn .txt { display: none; }
  .a11y-panel { top: 70px; right: 16px; }
}

/* Text size */
html[data-text="l"] { --scale: 1.15; }
html[data-text="xl"] { --scale: 1.32; }
html[data-text="l"] .hero h1, html[data-text="xl"] .hero h1 { white-space: normal; }
/* High contrast */
html[data-contrast="high"] { --bg: #ffffff; --text: #000000; --heading: #000000; --muted: #1f1f1f; --accent: #9A3412; --accent-dark: #6b2409; --soft: #ffffff; --line: #000000; --card: #ffffff; }
html[data-contrast="high"] .logos img { filter: none; opacity: 1; }
html[data-contrast="high"] .slide .card, html[data-contrast="high"] .about-hero .card { border: 2px solid #000; background: #fff; }
html[data-contrast="high"] .collab { border-top: 2px solid #000; }
html[data-contrast="high"] a { text-decoration: underline; }
html[data-contrast="high"] .btn { background: #000; color: #fff; }
/* Readable font (Atkinson Hyperlegible, designed for low vision) */
html[data-font="readable"] { --font: "Atkinson Hyperlegible", Verdana, sans-serif; --display: "Atkinson Hyperlegible", Verdana, sans-serif; }
html[data-font="readable"] h1, html[data-font="readable"] h2, html[data-font="readable"] h3, html[data-font="readable"] h4 { font-weight: 700; letter-spacing: 0; }
html[data-font="readable"] .hero h1 { font-size: calc((100vw - 2 * var(--gutter)) / 8.6); }
/* Always underline links */
html[data-links="underline"] a:not(.btn):not(.logo) { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 4px; }
html[data-links="underline"] .tile h2 { text-decoration: underline; }
/* Wider spacing */
html[data-spacing="wide"] body { line-height: 1.85; letter-spacing: .02em; word-spacing: .12em; }
html[data-spacing="wide"] p, html[data-spacing="wide"] li { margin-bottom: 1.4em; }
/* Reduce motion */
html[data-motion="reduce"] { scroll-behavior: auto; }
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after { transition: none !important; animation: none !important; }
html[data-motion="reduce"] .js .reveal, html[data-motion="reduce"] .reveal { opacity: 1 !important; transform: none !important; }
