/* Josh Faggart Creative. Layout and components. Values come from tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font-family: var(--font); font-size: var(--step-0); line-height: 1.5; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 20; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-head { background: var(--ink); color: var(--paper); }
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 34px; padding-bottom: 34px; }
.top .logo { display: block; position: relative; z-index: 31; }
.top .logo img { height: 88px; width: auto; }
.top nav { display: flex; gap: 40px; font-size: 21px; font-weight: 500; }
.menu-btn { display: none; position: relative; z-index: 31; width: 44px; height: 44px; margin-right: -8px; border: 0; background: none; color: var(--paper); cursor: pointer; }
.menu-btn i { position: absolute; left: 10px; right: 10px; height: 2px; background: currentColor; transition: transform .35s var(--ease); }
.menu-btn i:first-of-type { top: 17px; }
.menu-btn i:last-of-type { top: 25px; }
.menu-btn[aria-expanded="true"] i:first-of-type { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] i:last-of-type { transform: translateY(-4px) rotate(-45deg); }
.site-head :focus-visible { outline-color: var(--paper); }
.top nav a { text-decoration: none; padding-bottom: 4px; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .35s var(--ease); }
.top nav a:hover, .top nav a[aria-current] { background-size: 100% 2px; }

/* Shared type */
.lede { font-weight: 500; font-size: var(--step-4); line-height: .98; letter-spacing: -.03em; text-wrap: balance; max-width: 22ch; }
.lede .soft { color: var(--mute); }
.h-page { font-weight: 500; font-size: var(--step-4); line-height: .98; letter-spacing: -.03em; }
.h-sec { font-weight: 700; font-size: var(--step-2); line-height: 1.05; letter-spacing: -.015em; }
.big { font-size: var(--step-1); line-height: 1.35; max-width: 36ch; }
.prose { max-width: 66ch; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 1em; }
.prose h3 { font-weight: 700; font-size: var(--step-1); margin: 1.8em 0 .5em; }
.prose ul { padding-left: 1.1em; }
.prose li + li { margin-top: .35em; }
.prose a, .link { text-underline-offset: 4px; }
.btn { display: inline-flex; align-items: center; gap: 10px; font: inherit; font-weight: 600; font-size: 16px; padding: 12px 22px; border-radius: 999px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); text-decoration: none; cursor: pointer; transition: background .2s, color .2s; }
.btn:hover { background: var(--paper); color: var(--ink); }
.btn.ghost { background: none; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* Home hero */
.hero { padding-top: clamp(40px, 7vw, 110px); }
.intro { display: grid; grid-template-columns: 1fr 1fr; gap: var(--pad); padding-top: 36px; padding-bottom: 56px; align-items: end; }
.intro p { font-size: var(--step-1); line-height: 1.3; max-width: 30ch; }
.status { justify-self: end; display: flex; gap: 12px; align-items: center; font-size: 15px; font-weight: 500; }
.status i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--ink); }

/* Index list */
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; font-size: 15px; }
.filters button { font: inherit; font-weight: 500; color: var(--ink); border: 1.5px solid var(--ink); background: none; border-radius: 999px; padding: 6px 16px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.index-wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: calc(var(--pad) * 1.5); align-items: start; }
.index { list-style: none; padding: 0; border-top: 2px solid var(--rule); }
.index li[hidden] { display: none; }
.index a { position: relative; isolation: isolate; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "p t" "c t"; column-gap: 16px; row-gap: 2px; align-items: baseline; padding: 14px 0 12px; border-bottom: 1px solid var(--rule); text-decoration: none; transition: color .3s var(--ease); }
.index .p, .index .c, .index .t { transition: transform .45s var(--ease), color .3s var(--ease); }
.index a:hover .p, .index a:hover .c, .index a:focus-visible .p, .index a:focus-visible .c, .index li.on .p, .index li.on .c { transform: translateX(16px); }
.index a:hover .t, .index a:focus-visible .t, .index li.on .t { transform: translateX(-16px); }
.index a::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left center; transition: transform .45s var(--ease); z-index: -1; }
.index .p { grid-area: p; font-weight: 700; font-size: var(--step-2); line-height: 1.05; letter-spacing: -.015em; }
.index .p { position: relative; }
.index .arrow { position: absolute; display: inline-block; margin-left: .3em; white-space: nowrap; opacity: 0; transform: translateX(-.4em); transition: opacity .3s var(--ease), transform .45s var(--ease); }
.index .c { grid-area: c; font-size: 15px; color: var(--mute); transition: color .3s var(--ease); }
.index .t { grid-area: t; font-size: 13px; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; transition: color .3s var(--ease); }
.index .thumb { display: none; }
.index a:hover, .index a:focus-visible, .index li.on a { color: var(--paper); }
.index a:hover::before, .index a:focus-visible::before, .index li.on a::before { transform: scaleX(1); }
.index a:hover .c, .index a:hover .t, .index a:focus-visible .c, .index a:focus-visible .t, .index li.on .c, .index li.on .t { color: #c4c4c4; }
.index a:hover .arrow, .index a:focus-visible .arrow, .index li.on .arrow { opacity: 1; transform: none; }
.index-foot { padding-top: 20px; }
.preview { position: sticky; top: 24px; }
.preview figure { aspect-ratio: 1 / 1; width: min(100%, calc(100vh - 140px)); background: var(--wash); overflow: hidden; }
.preview img { width: 100%; height: 100%; object-fit: cover; clip-path: inset(0); transition: clip-path .6s var(--ease); }
.preview img.swap { clip-path: inset(100% 0 0 0); transition: none; }
.preview-cap { display: flex; max-width: min(100%, calc(100vh - 140px)); justify-content: space-between; gap: 16px; padding-top: 12px; font-size: 15px; }
.preview-cap span { color: var(--mute); }

/* Custom cursor (pointer devices only, added by site.js) */
.cursor { position: fixed; left: 0; top: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; mix-blend-mode: difference; pointer-events: none; z-index: 50; display: grid; place-items: center; transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), opacity .2s; }
.cursor span { font-size: 11px; font-weight: 700; letter-spacing: .05em; color: #000; mix-blend-mode: normal; opacity: 0; transition: opacity .2s; }
.cursor.link { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
.cursor.view { width: 62px; height: 62px; margin: -31px 0 0 -31px; }
.cursor.view span { opacity: 1; }
.cursor.hide { opacity: 0; }
html.has-cursor, html.has-cursor a, html.has-cursor button, html.has-cursor select { cursor: none; }
html.has-cursor input, html.has-cursor textarea { cursor: text; }

/* About teaser, CTA bands */
.teaser { display: grid; grid-template-columns: 1fr 1fr; gap: var(--pad); padding-top: var(--section); }
.teaser p { font-size: var(--step-1); line-height: 1.4; max-width: 40ch; margin-bottom: 20px; }

/* Project page */
.proj-head { padding-top: clamp(32px, 5vw, 72px); padding-bottom: 32px; }
.back { display: inline-block; font-size: 15px; font-weight: 500; margin-bottom: 28px; text-underline-offset: 4px; }
.proj-title { font-weight: 800; font-size: var(--step-4); line-height: .95; letter-spacing: -.035em; }
.proj-meta { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--pad); padding-top: 32px; margin-top: 32px; border-top: 2px solid var(--rule); }
.proj-meta p { font-size: var(--step-1); line-height: 1.35; max-width: 40ch; }
.proj-meta dl { display: contents; }
.proj-meta dt { font-size: 13px; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.proj-meta dd { font-weight: 600; font-size: 16px; }
.gallery { columns: 2; column-gap: var(--gap); padding-bottom: 8px; }
.gallery.c3 { columns: 3; }
.gallery figure { break-inside: avoid; margin-bottom: var(--gap); }
.gallery figure.lead { column-span: all; }
.videos { display: grid; gap: var(--gap); margin-bottom: var(--gap); }
.videos.two { grid-template-columns: 1fr 1fr; }
.video { position: relative; aspect-ratio: 16 / 9; background: var(--ink); overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.video figcaption { font-size: 15px; color: var(--mute); padding-top: 8px; }
.video-wrap figcaption { font-size: 15px; color: var(--mute); padding-top: 8px; }
.slot { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px; color: var(--paper); padding: 16px; font-size: 14px; }
.slot b { font-size: 17px; }
.ph { background: var(--wash); border: 1.5px dashed #999; display: grid; place-content: center; text-align: center; gap: 6px; padding: 16px; font-size: 13px; color: var(--mute); width: 100%; }
.ph b { color: var(--ink); font-size: 14px; word-break: break-all; }
.next { display: block; text-decoration: none; padding: 40px 0 0; margin-top: var(--section); border-top: 2px solid var(--rule); }
.next span { display: block; font-size: 15px; color: var(--mute); margin-bottom: 8px; }
.next b { display: inline-block; font-weight: 800; font-size: var(--step-3); letter-spacing: -.02em; line-height: 1; transition: transform .45s var(--ease); }
.next b::after { content: " →"; display: inline-block; transition: transform .45s var(--ease); }
.next:hover b { transform: translateX(12px); }
.next:hover b::after { transform: translateX(10px); }

/* Page heads */
.page-head { padding-top: clamp(40px, 7vw, 110px); padding-bottom: 40px; }
.page-head .big { margin-top: 24px; }

/* About */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: calc(var(--pad) * 2); padding-top: 24px; align-items: start; }
.about-photo { position: sticky; top: 24px; }
.about-photo .ph { aspect-ratio: 4 / 5; }
.about-grid section + section { margin-top: 48px; }
.about-grid .h-sec { margin-bottom: 16px; }
.big-prose p { font-size: var(--step-1); line-height: 1.45; }

/* Resume */
.cv { display: grid; grid-template-columns: 1fr 2.4fr; gap: calc(var(--pad) * 2); padding-top: 40px; border-top: 2px solid var(--rule); }
.cv aside { position: sticky; top: 24px; align-self: start; font-size: 15px; }
.cv aside .btn { margin-top: 20px; }
.cv aside p + p { margin-top: 8px; }
.cv .role { font-weight: 600; font-size: var(--step-1); }
.cv section + section { margin-top: 56px; }
.cv .h-sec { margin-bottom: 18px; }
.cv .prose { max-width: 72ch; }
.cv .prose h3 { font-size: clamp(20px, 1.8vw, 26px); margin-top: 1.6em; padding-top: 1.2em; border-top: 1px solid var(--hairline); }
.cv .prose h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.cv .prose em { color: var(--mute); }
.cv .prose ul { margin-top: .8em; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.4fr; gap: calc(var(--pad) * 2); padding-top: 8px; }
.contact aside p { font-size: var(--step-1); line-height: 1.4; max-width: 34ch; }
.contact aside p + p { margin-top: 18px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 15px; }
.field input, .field select, .field textarea { font: inherit; font-size: 17px; color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink); border-radius: 999px; padding: 12px 20px; width: 100%; }
.field textarea { border-radius: 26px; padding: 16px 20px; }
.field textarea { min-height: 160px; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 26px) 52%, calc(100% - 20px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 48px; }
.field .req { margin-left: 2px; color: var(--error); }
.form-note { grid-column: 1 / -1; font-size: 14px; color: var(--mute); }
.field .hint { font-size: 14px; color: var(--mute); }
.field .err { font-size: 14px; color: var(--error); font-weight: 600; }
.field .err:empty { display: none; }
.field [aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.hp { position: absolute; left: -9999px; }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.form-foot small { font-size: 14px; color: var(--mute); }
.form-msg { grid-column: 1 / -1; font-weight: 600; }
.thanks h2 { font-weight: 600; font-size: var(--step-3); letter-spacing: -.02em; margin-bottom: 12px; }

/* Footer */
.site-foot { margin-top: var(--section); padding-bottom: 32px; }
.foot { padding-top: 48px; border-top: 2px solid var(--rule); display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.foot strong { display: block; font-weight: 800; font-size: clamp(30px, 4.2vw, 60px); letter-spacing: -.035em; letter-spacing: -.02em; line-height: 1; margin-bottom: 12px; }
.foot strong + .btn { margin-top: 8px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; justify-content: flex-end; }
.foot nav a { text-underline-offset: 4px; }
.foot small { display: block; font-size: 14px; color: var(--mute); margin-top: 10px; text-align: right; }

/* 404 */
.nf { padding-top: clamp(64px, 12vw, 180px); }
.nf p { font-size: var(--step-1); margin: 20px 0 28px; }

/* Motion */
.lede .caret { display: inline-block; width: .07em; height: .82em; margin-left: .05em; background: var(--mute); vertical-align: -.04em; animation: blink 1s steps(1) infinite; }
html:not(.js) .lede .caret { display: none; }
@keyframes blink { 50% { opacity: 0; } }
html.js .lede .name { display: inline-block; animation: rise .9s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(.35em); } }
.status i { position: relative; }
.status i::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1.5px solid var(--ink); animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: 1; } 80%, 100% { transform: scale(2.2); opacity: 0; } }
html.js .reveal { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s var(--ease); }
html.js .reveal img { transform: scale(1.08); transition: transform 1.4s var(--ease); }
html.js .reveal.in { clip-path: inset(0); }
html.js .reveal.in img { transform: none; }
html.js .index li { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 45ms); }
html.js .index li.in { opacity: 1; transform: none; }
.marquee { margin-top: var(--section); background: var(--ink); color: var(--paper); overflow: hidden; padding-block: clamp(14px, 2vw, 26px); }
.marquee .track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee .track > div { display: flex; align-items: center; gap: .45em; padding-right: .45em; font-size: clamp(30px, 4.6vw, 76px); font-weight: 800; letter-spacing: -.035em; line-height: 1; white-space: nowrap; }
.marquee i { font-style: normal; font-size: .45em; color: var(--mute); }
@keyframes marquee { to { transform: translateX(-50%); } }
.proj-title { animation: rise .9s var(--ease) both; }

@media (max-width: 860px) {
  .index-wrap { grid-template-columns: 1fr; }
  .preview { display: none; }
  .index a { grid-template-columns: 76px 1fr; grid-template-areas: "i p" "i c"; align-items: center; column-gap: 14px; }
  .index .thumb { display: block; grid-area: i; width: 76px; height: 76px; object-fit: cover; }
  .index .p { align-self: end; }
  .index .c { align-self: start; }
  .index .t { display: none; }
  .top nav { gap: 22px; font-size: 16px; }
  .intro, .teaser, .about-grid, .cv, .contact { grid-template-columns: 1fr; }
  .status { justify-self: start; }
  .proj-meta { grid-template-columns: 1fr 1fr; }
  .proj-meta > p { grid-column: 1 / -1; }
  .about-photo, .cv aside { position: static; }
  .about-photo { max-width: 420px; }
}
@media (max-width: 600px) {
  .top { padding-top: 16px; padding-bottom: 16px; }
  .top .logo img { height: 46px; }
  html.js .menu-btn { display: block; }
  html.js .top nav { position: fixed; inset: 0; z-index: 30; background: var(--ink); flex-direction: column; justify-content: center; gap: 6px; padding: 96px max(24px, env(safe-area-inset-left, 0px)) 48px; opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility 0s .3s; }
  html.js .top nav a { font-size: clamp(40px, 12vw, 60px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; padding-bottom: 6px; transform: translateY(16px); opacity: 0; transition: transform .5s var(--ease), opacity .4s var(--ease), background-size .35s var(--ease); }
  html.js .site-head.open .top nav { opacity: 1; visibility: visible; transition: opacity .3s var(--ease); }
  html.js .site-head.open .top nav a { transform: none; opacity: 1; }
  html.js .site-head.open .top nav a:nth-child(2) { transition-delay: .05s; }
  html.js .site-head.open .top nav a:nth-child(3) { transition-delay: .1s; }
  html.js .site-head.open .top nav a:nth-child(4) { transition-delay: .15s; }
  html:not(.js) .top nav { gap: 14px; font-size: 15px; }
  .lede { font-size: 40px; }
  .index .p { font-size: 22px; }
  .gallery, .gallery.c3 { columns: 1; }
  .gallery.c3 { columns: 2; }
  .videos.two { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .foot { flex-direction: column; align-items: start; }
  .foot nav { justify-content: flex-start; }
  .foot small { text-align: left; }
}
@media (hover: none) { .cursor { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } html.js .reveal { clip-path: none; } html.js .reveal img { transform: none; } html.js .index li { opacity: 1; transform: none; } .lede .caret { display: none; } }
