/* Portfolio styles. Your accent colour is set in the admin panel
   (Settings > Profile & contact > Look), not here. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-italic-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f2f3f0;
  --ink: #17191e;
  --muted: #5b5f68;
  --rule: #d2d5cf;
  --panel: #e6e8e3;
  --cyan: #00a3e0;
  --magenta: #d6006f;
  --yellow: #f2dc00;
  --accent: #d6006f;
  --on-accent: #ffffff;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1360px;
  --gap: clamp(20px, 2.4vw, 32px);
  --font: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #131519;
    --ink: #e8e9e5;
    --muted: #9b9fa8;
    --rule: #2c3037;
    --panel: #1d2026;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #131519;
  --ink: #e8e9e5;
  --muted: #9b9fa8;
  --rule: #2c3037;
  --panel: #1d2026;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -60px; z-index: 10; background: var(--ink); color: var(--paper); padding: 8px 14px; }
.skip:focus { top: 12px; }

/* ---------- Layout ---------- */
.site-header, main, .site-footer, .cta {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}
.wordmark {
  font-weight: 700;
  font-stretch: 112%;
  font-size: 16px;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.site-nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); font-size: 15px; flex-shrink: 0; }
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.theme-toggle {
  display: grid; place-items: center;
  width: 36px; height: 36px; margin-right: -8px;
  border: 0; background: none; border-radius: 50%; cursor: pointer;
}
.theme-toggle:hover { background: var(--panel); }

section { padding-block: clamp(56px, 9vw, 120px) 0; }
section h2 { font-size: clamp(28px, 3.6vw, 44px); font-stretch: 112%; letter-spacing: -0.02em; }

/* ---------- The proof sheet: crop marks around big type ---------- */
.proof { position: relative; padding: clamp(18px, 3vw, 36px) clamp(4px, 1vw, 12px); }
.crop { position: absolute; width: 22px; height: 22px; pointer-events: none; }
.crop::before, .crop::after { content: ""; position: absolute; background: var(--ink); }
.crop::before { width: 16px; height: 1px; }
.crop::after { width: 1px; height: 16px; }
.crop.tl { top: -14px; left: -14px; }
.crop.tl::before { top: 14px; left: -8px; } .crop.tl::after { left: 14px; top: -8px; }
.crop.tr { top: -14px; right: -14px; }
.crop.tr::before { top: 14px; right: -8px; } .crop.tr::after { right: 14px; top: -8px; }
.crop.bl { bottom: -14px; left: -14px; }
.crop.bl::before { bottom: 14px; left: -8px; } .crop.bl::after { left: 14px; bottom: -8px; }
.crop.br { bottom: -14px; right: -14px; }
.crop.br::before { bottom: 14px; right: -8px; } .crop.br::after { right: 14px; bottom: -8px; }
.reg-mark { position: absolute; top: -25px; left: 50%; transform: translateX(-50%); color: var(--ink); }

.display {
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.035em;
  line-height: 0.9;
  overflow-wrap: anywhere;
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 7vw, 96px); }
.hero .proof { margin-inline: 14px; }
.hero-name {
  /* Shrinks long names so they always fit */
  font-size: min(184px, 13.5vw, calc(88vw / (var(--display-chars) * 0.78)));
}
.hero-text {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  margin-top: clamp(40px, 6vw, 72px);
  align-items: start;
}
.intro {
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.012em;
  max-width: 30ch;
  text-wrap: pretty;
}
.hero-side { display: grid; gap: 18px; padding-top: 6px; }
.role { color: var(--muted); }
.availability { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }

.colour-bar { display: flex; margin-top: clamp(40px, 6vw, 72px); }
.colour-bar span { width: 22px; height: 22px; }
.colour-bar .c { background: var(--cyan); }
.colour-bar .m { background: var(--magenta); }
.colour-bar .y { background: var(--yellow); }
.colour-bar .k { background: var(--ink); }
.colour-bar .spot { background: var(--accent); margin-left: 6px; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1.5px solid var(--ink); border-radius: 2px;
  background: transparent; color: var(--ink);
  font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Work grid ---------- */
.section-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 16px 32px;
  padding-bottom: 20px; margin-bottom: clamp(24px, 3vw, 40px);
  border-bottom: 1px solid var(--rule);
}
.filters { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.filters button {
  border: 0; background: none; padding: 6px 0; cursor: pointer;
  color: var(--muted); font-size: 16px;
  border-bottom: 2px solid transparent;
}
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.filters .count { font-size: 12px; vertical-align: super; margin-left: 1px; font-weight: 400; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: calc(var(--gap) * 1.4) var(--gap);
  align-items: start;
}
.grid.is-masonry { display: block; position: relative; }
.grid.is-masonry .item { position: absolute; top: 0; left: 0; }
.grid.is-animated .item { transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
@media (prefers-reduced-motion: reduce) { .grid.is-animated .item { transition: none; } }
.item[hidden] { display: none; }
.item a { display: block; text-decoration: none; }
.frame { display: block; background: var(--panel); aspect-ratio: 1 / var(--ratio); overflow: hidden; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.item-title { display: block; margin-top: 14px; font-weight: 600; line-height: 1.3; }
.item-meta { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; }
.item a:hover .item-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.item a:focus-visible { outline-offset: 6px; }
.empty-state { color: var(--muted); max-width: 52ch; }

/* ---------- About ---------- */
.about h2 { margin-bottom: clamp(24px, 3vw, 40px); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.about-grid.no-photo { grid-template-columns: minmax(0, 1fr); }
.portrait { margin: 0; background: var(--panel); }
.about-body { display: grid; gap: 28px; }
.prose { max-width: 64ch; }
.prose > * + * { margin-top: 1em; }
.prose p:first-child { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.5; }
.prose h3 { font-size: 19px; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose ul { list-style: disc; }
.prose li + li { margin-top: 0.3em; }

.services, .tools { margin-top: clamp(48px, 6vw, 80px); }
.services h3, .tools h3 { font-size: 20px; margin-bottom: 20px; }
.services ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0 var(--gap); border-top: 1px solid var(--rule); }
.services li { padding: 20px 0 24px; border-bottom: 1px solid var(--rule); }
.services h4 { font-size: 18px; font-weight: 600; }
.services p { margin-top: 6px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.tools ul { display: flex; flex-wrap: wrap; gap: 8px; }
.tools li { padding: 6px 14px; border: 1px solid var(--rule); border-radius: 2px; font-size: 15px; }

/* ---------- Testimonials ---------- */
.testimonials h2 { margin-bottom: clamp(24px, 3vw, 40px); }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: var(--gap) calc(var(--gap) * 2); }
.quote { margin: 0; padding-top: 20px; border-top: 2px solid var(--ink); }
.quote blockquote { margin: 0; font-size: clamp(19px, 1.8vw, 23px); line-height: 1.45; letter-spacing: -0.005em; }
.quote figcaption { margin-top: 16px; display: grid; font-size: 15px; }
.quote-name { font-weight: 600; }
.quote-role { color: var(--muted); }

/* ---------- Contact ---------- */
.contact { padding-bottom: clamp(56px, 8vw, 104px); }
.contact-title { font-size: min(120px, 9vw, calc(88vw / 14)); max-width: 14ch; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); margin-top: clamp(32px, 5vw, 56px); align-items: start; }
.contact-grid.no-form { grid-template-columns: minmax(0, 1fr); }
.contact-direct { display: grid; gap: 20px; }
.contact-text { font-size: 19px; max-width: 40ch; }
.email, .phone { display: grid; gap: 2px; }
.email span, .phone span { color: var(--muted); font-size: 14px; }
.email a, .phone a { font-size: clamp(18px, 1.8vw, 22px); font-weight: 600; word-break: break-word; }
.socials { display: flex; flex-wrap: wrap; gap: 6px 20px; }

.contact-form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 15px; font-weight: 600; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: transparent; border: 1.5px solid var(--rule); border-radius: 2px;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field textarea { resize: vertical; min-height: 140px; }
.contact-form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }
.form-status:empty { display: none; }
.form-status { font-weight: 600; }
.form-status.is-error { color: #c4291c; }
:root[data-theme="dark"] .form-status.is-error { color: #ff7a6b; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  padding-block: 28px 36px; border-top: 1px solid var(--rule);
  color: var(--muted); font-size: 14px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ---------- Project page ---------- */
.project { padding-top: clamp(16px, 3vw, 32px); }
.back a { font-size: 15px; color: var(--muted); }
.project-head { margin-top: clamp(36px, 5vw, 64px); }
.proof-small { margin-inline: 14px; }
.project-title { font-size: clamp(40px, 7vw, 104px); max-width: 16ch; }
.summary { margin-top: clamp(28px, 4vw, 44px); font-size: clamp(20px, 2.1vw, 27px); line-height: 1.4; max-width: 40ch; letter-spacing: -0.01em; }
.facts { display: flex; flex-wrap: wrap; gap: 16px clamp(28px, 4vw, 56px); margin: clamp(28px, 4vw, 40px) 0 0; padding-top: 20px; border-top: 1px solid var(--rule); }
.facts div { display: grid; gap: 2px; }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; font-weight: 600; }
.description { margin-top: clamp(32px, 4vw, 48px); }
.description p:first-child { font-size: inherit; line-height: inherit; }
.gallery { display: grid; gap: clamp(20px, 3vw, 40px); margin-top: clamp(40px, 5vw, 64px); }
.gallery figure { margin: 0; }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: var(--panel); cursor: zoom-in; }
.zoom img { width: 100%; }
.gallery figcaption { margin-top: 10px; color: var(--muted); font-size: 15px; }
.external { margin-top: 40px; }
.pager { display: flex; justify-content: space-between; gap: 24px; margin-top: clamp(56px, 8vw, 96px); padding-top: 24px; border-top: 1px solid var(--rule); }
.pager a { display: grid; gap: 4px; text-decoration: none; max-width: 45%; }
.pager-next { text-align: right; margin-left: auto; }
.pager-label { color: var(--muted); font-size: 14px; }
.pager-title { font-weight: 700; font-stretch: 112%; font-size: clamp(18px, 2vw, 24px); line-height: 1.2; }
.pager a:hover .pager-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }

.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px;
  padding-block: clamp(48px, 7vw, 88px);
}
.cta-text { font-size: clamp(24px, 3vw, 38px); font-weight: 700; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1.15; max-width: 22ch; }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(12, 13, 16, 0.96); color: #f2f3f0;
}
.lightbox::backdrop { background: rgba(12, 13, 16, 0.96); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100vh - 96px); width: auto; height: auto; object-fit: contain; }
.lightbox button {
  position: fixed; display: grid; place-items: center;
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1); color: #f2f3f0; cursor: pointer;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox :focus-visible { outline-color: #f2f3f0; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- 404 ---------- */
.nf { padding-block: clamp(64px, 10vw, 140px); display: grid; gap: 24px; justify-items: start; }
.nf .proof { margin: 14px 14px 24px; }
.nf h1 { font-size: clamp(40px, 8vw, 112px); max-width: 12ch; }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .hero-text, .about-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 420px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .site-nav { font-size: 14px; }
  .contact-title { font-size: clamp(36px, 11vw, 64px); }
  .actions .btn { flex: 1 1 100%; }
  .pager a { max-width: 48%; }
}
@media (max-width: 380px) {
  .wordmark { font-size: 14px; }
  .site-nav { gap: 12px; }
}

@media print {
  .site-header nav, .cta, .lightbox, .contact-form, .theme-toggle { display: none !important; }
  body { background: #fff; color: #000; }
}
