:root {
  --paper: #f5efe3;
  --paper-2: #ece3d1;
  --ink: #1a140e;
  --ink-soft: #3d3328;
  --muted: #6e604c;
  --rule: #1a140e;
  --gold: #a8833f;      /* hairlines and ornaments */
  --gold-ink: #7a5a20;  /* gold for text on ivory (AA contrast) */
  --gold-lit: #cfac68;  /* gold on the dark band */
  --noir: #17120d;
  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --body: "EB Garamond", Garamond, Georgia, serif;
  --caps: "Cinzel", "Trajan Pro", Georgia, serif;
  --gutter: clamp(16px, 5vw, 64px);
  --measure: 38rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.18rem/1.7 var(--body);
  -webkit-font-smoothing: antialiased;
  /* paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.08 0 0 0 0 0.07 0 0 0 0 0.06 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px var(--gutter);
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
}
.site-header::after { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; height: 1px; background: var(--rule); opacity: .9; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 50px; height: 50px; }
.brand span { font: 500 1.35rem/1 var(--display); letter-spacing: .01em; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(14px, 2.2vw, 30px); }
.nav a {
  font: 400 .78rem/1 var(--caps); text-transform: uppercase; letter-spacing: .12em;
  text-decoration: none; padding: 6px 0; background: linear-gradient(var(--ink), var(--ink)) left bottom / 0 1px no-repeat;
  transition: background-size .35s ease;
}
.nav a:hover, .nav a[aria-current="page"] { background-size: 100% 1px; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); font: 400 .78rem var(--caps); letter-spacing: .12em; text-transform: uppercase; }

@media (max-width: 760px) {
  /* backdrop-filter would trap the fixed menu overlay inside the header */
  .site-header { backdrop-filter: none; background: var(--paper); }
  .brand span { display: none; }
  .menu-toggle { display: block; }
  .nav { position: fixed; inset: 0; background: var(--paper); display: none; flex-direction: column; justify-content: center; padding: var(--gutter); }
  .nav.open { display: flex; }
  .nav ul { flex-direction: column; gap: 22px; }
  .nav a { font: 400 2.4rem/1.1 var(--display); text-transform: none; letter-spacing: 0; }
  .nav .menu-toggle { position: absolute; top: 26px; right: var(--gutter); }
}

/* ---------- layout ---------- */
main { display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(64px, 11vw, 140px) 0; }
.eyebrow { font: 400 .74rem/1 var(--caps); text-transform: uppercase; letter-spacing: .18em; color: var(--muted); margin: 0 0 22px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.02; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(3.2rem, 10vw, 8.5rem); }
h2 { font-size: clamp(2.2rem, 5.5vw, 4.2rem); }
h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.lede { font: italic 400 clamp(1.25rem, 2.2vw, 1.6rem)/1.45 var(--display); color: var(--ink-soft); max-width: 34rem; }
.prose p { max-width: var(--measure); margin: 0 0 1.15em; }
.muted { color: var(--muted); }

/* hand-drawn ink rule */
.ink-rule { display: block; width: 100%; height: 14px; color: var(--ink); margin: 0; }
.ink-rule path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.js .ink-rule path { filter: url(#ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font: 400 .78rem/1 var(--caps); text-transform: uppercase; letter-spacing: .14em;
  color: var(--ink); text-decoration: none; padding: 16px 22px; border: 1px solid var(--ink); background: transparent;
  cursor: pointer; transition: background .25s, color .25s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn .arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(48px, 9vw, 120px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 80px); align-items: end; }
.hero h1 .stroke { display: block; font-style: italic; font-weight: 400; }
.hero .lede { margin: 28px 0 36px; }
.hero figure { margin: 0; }
.ink-photo { filter: grayscale(1) contrast(1.15) brightness(.95); mix-blend-mode: multiply; }
.hero figure img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
figcaption { font: 400 .72rem/1.4 var(--caps); letter-spacing: .08em; color: var(--muted); margin-top: 10px; text-transform: uppercase; }
@media (max-width: 760px) { .hero-grid { grid-template-columns: 1fr; } .hero figure img { aspect-ratio: 3/2; } }

/* page heading band */
.page-head { padding-bottom: clamp(32px, 6vw, 72px); }
.page-head h1 { font-size: clamp(3rem, 9vw, 7rem); }

/* ---------- pillars (home) ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--ink); }
.pillar { padding: 36px 28px 8px 0; }
.pillar + .pillar { padding-left: 28px; border-left: 1px solid var(--ink); }
.pillar img { width: 100%; aspect-ratio: 3/2; object-fit: cover; margin-bottom: 26px; }
.pillar h3 { margin: 10px 0 14px; }
@media (max-width: 860px) {
  .pillars { grid-template-columns: 1fr; }
  .pillar, .pillar + .pillar { padding: 32px 0; border-left: 0; }
  .pillar + .pillar { border-top: 1px solid var(--ink); }
}

/* split rows */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 7vw, 96px); align-items: start; }
.split > figure { margin: 0; position: sticky; top: 110px; }
.split > figure img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split > figure { position: static; } .split > figure img { aspect-ratio: 3/2; } }

/* ---------- education ---------- */
.chapter { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 7vw, 104px); align-items: center; padding: clamp(56px, 8vw, 112px) 0; border-top: 1px solid var(--ink); }
.chapter.text-only, .work.text-only { grid-template-columns: 1fr; }
.chapter:nth-child(odd) .chapter-side { order: 2; }
/* photo set on the page like a print: offset ink frame behind it */
.chapter-side { position: relative; margin: 0 18px 18px 0; }
.chapter-side::before { content: ""; position: absolute; inset: 0; border: 1.5px solid var(--ink); transform: translate(18px, 18px); }
.chapter-side img { position: relative; width: 100%; aspect-ratio: 4/5; object-fit: cover; box-shadow: 0 1px 0 var(--ink); transition: filter .6s ease; }
.chapter-side:hover img { filter: none; mix-blend-mode: normal; }
.chapter h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 26px; }
@media (max-width: 760px) {
  .chapter { grid-template-columns: 1fr; }
  .chapter:nth-child(odd) .chapter-side { order: 0; }
  .chapter-side { margin: 0 10px 10px 0; }
  .chapter-side::before { transform: translate(10px, 10px); }
  .chapter-side img { aspect-ratio: 3/2; }
}

/* ---------- works (projects/products) ---------- */
.work { display: grid; grid-template-columns: 120px 1fr; gap: clamp(20px, 5vw, 64px); padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--ink); }
.work-mark img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.work h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); margin-bottom: 18px; }
.work .tba { font: italic 400 1.3rem var(--display); color: var(--muted); margin: 0; }
.tracks { list-style: none; padding: 0; margin: 8px 0 28px; max-width: var(--measure); }
.tracks li { display: flex; gap: 18px; padding: 10px 0; border-bottom: 1px dotted color-mix(in srgb, var(--ink) 45%, transparent); font: 400 1.25rem var(--display); }
.price { font: 400 .8rem var(--caps); letter-spacing: .14em; text-transform: uppercase; border: 1px solid var(--ink); display: inline-block; padding: 8px 12px; margin: 0 0 26px; }
@media (max-width: 600px) { .work { grid-template-columns: 1fr; } .work-mark { width: 96px; } }

/* video facade (loads YouTube only on click, like the original consent gate) */
.video { position: relative; aspect-ratio: 16/9; background: var(--ink); color: var(--paper); margin: 8px 0 0; max-width: 760px; }
.video button { all: unset; cursor: pointer; position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px; }
.video button:focus-visible { outline: 2px solid var(--paper); outline-offset: -6px; }
.video .play { width: 64px; height: 64px; border: 1px solid var(--paper); border-radius: 50%; display: grid; place-items: center; transition: transform .3s; }
.video button:hover .play { transform: scale(1.08); }
.video small { font: 400 .7rem/1.5 var(--caps); letter-spacing: .06em; opacity: .7; max-width: 30rem; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- gallery ---------- */
.set { padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--ink); }
.set-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; margin-bottom: 28px; }
.set-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.set-head p { margin: 0; font: 400 .74rem/1.5 var(--caps); letter-spacing: .06em; color: var(--muted); }
.grid { columns: 4 220px; column-gap: 14px; }
.grid a { display: block; margin-bottom: 14px; break-inside: avoid; overflow: hidden; }
.grid img { width: 100%; height: auto; filter: grayscale(1) contrast(1.1); transition: filter .5s ease, transform .6s ease; }
.grid a:hover img, .grid a:focus-visible img { filter: none; transform: scale(1.02); }

dialog.lightbox { border: 0; padding: 0; max-width: none; max-height: none; width: 100vw; height: 100dvh; background: rgba(15, 13, 10, .96); color: var(--paper); }
dialog.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 64px 24px; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 120px); object-fit: contain; }
.lightbox figcaption { color: #b9b2a3; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--paper); cursor: pointer; font: 400 .78rem var(--caps); letter-spacing: .14em; text-transform: uppercase; padding: 14px; }
.lightbox .lb-close { top: 8px; right: 12px; }
.lightbox .lb-prev { left: 4px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; }
.lightbox .lb-next { right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; }
@media (max-width: 600px) { .lightbox figure { padding: 56px 12px 24px; } .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 8px; transform: none; } }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 7vw, 96px); }
.contact dl { margin: 28px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; }
.contact dt { font: 400 .72rem/1.9 var(--caps); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contact dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.contact dd a { text-decoration-thickness: 1px; text-underline-offset: 4px; }
form { display: grid; gap: 26px; }
label { display: grid; gap: 8px; font: 400 .72rem var(--caps); letter-spacing: .14em; text-transform: uppercase; }
input, textarea {
  font: 400 1.1rem/1.5 var(--body); color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--ink); padding: 8px 0; border-radius: 0;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus { outline: none; border-bottom-width: 2px; }
.form-note { font: 400 .72rem var(--caps); color: var(--muted); margin: -10px 0 0; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { padding: 56px var(--gutter) 40px; }
.site-footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--ink); padding-top: 28px; }
.social { list-style: none; display: flex; gap: 22px; padding: 0; margin: 0; }
.social a { font: 400 .74rem var(--caps); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.social a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer small { font: 400 .72rem var(--caps); color: var(--muted); letter-spacing: .06em; }

/* ---------- restrained motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform .9s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .ink-rule path { stroke-dasharray: 1400; stroke-dashoffset: 1400; transition: stroke-dashoffset 1.6s ease; }
  .js .ink-rule.in path { stroke-dashoffset: 0; }
  /* page titles are drawn with a pen by site.js; hidden until then, shown anyway after 3s if JS fails */
  .js .hero h1:not(.writing):not(.written) { visibility: hidden; animation: show 0s 3s forwards; }
  .hero h1 .w { white-space: nowrap; }
  .hero h1.writing .ch { color: transparent; }
  .hero h1 { position: relative; }
  .hero h1 .pen { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
  .hero h1 .pen text { fill: currentColor; stroke: currentColor; fill-opacity: 0; stroke-linecap: round; stroke-linejoin: round; }
}
@keyframes show { to { visibility: visible; } }

/* Courtyard set: one portrait beside three stacked landscapes, edges aligned */
.grid.courtyard { columns: auto; display: grid; grid-template-columns: .95fr 1fr; grid-template-rows: repeat(3, auto); gap: 14px; }
.grid.courtyard a { margin: 0; }
.grid.courtyard a:first-child { grid-row: span 3; }
.grid.courtyard a:not(:first-child) { aspect-ratio: 16/9; }
.grid.courtyard img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) { .grid.courtyard { grid-template-columns: 1fr; } .grid.courtyard a:first-child { grid-row: auto; aspect-ratio: 9/16; } }

.split-title { position: sticky; top: 110px; }
@media (max-width: 760px) { .split-title { position: static; } }

/* =====================================================================
   Romantic classical layer: ivory, ink and antique gold
   ===================================================================== */
body {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.07 0 0 0 0 0.03 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 120% 60% at 50% 0, #fbf7ee 0, transparent 70%);
}
::selection { background: var(--gold); color: var(--paper); }
h1, h2, h3 { font-weight: 400; letter-spacing: 0; }
.lede { color: var(--ink-soft); }

/* classical label: Roman capitals with a gold hairline */
.eyebrow, .nav a, .btn, .price, figcaption, label, .contact dt, .social a, .set-head p, .form-note, .site-footer small, .menu-toggle, .lightbox button {
  font-family: var(--caps); font-weight: 400;
}
.eyebrow { color: var(--gold-ink); letter-spacing: .26em; font-size: .74rem; }
.eyebrow::before { content: ""; display: inline-block; width: 34px; height: 1px; background: var(--gold); vertical-align: middle; margin: -2px 14px 0 0; }

/* ornamental flourish under every page title */
.hero h1::after {
  content: ""; display: block; width: 210px; height: 26px; margin-top: .3em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 210 26'%3E%3Cg fill='none' stroke='%23a8833f' stroke-width='1.1' stroke-linecap='round'%3E%3Cpath d='M0 13h72M138 13h72'/%3E%3Cpath d='M72 13c9 0 12-9 19-6 5 2 3 9-2 8-3-1-2-5 1-4'/%3E%3Cpath d='M138 13c-9 0-12-9-19-6-5 2-3 9 2 8 3-1 2-5-1-4'/%3E%3C/g%3E%3Cpath d='M105 5l6 8-6 8-6-8z' fill='%23a8833f'/%3E%3Ccircle cx='86' cy='19' r='1.3' fill='%23a8833f'/%3E%3Ccircle cx='124' cy='19' r='1.3' fill='%23a8833f'/%3E%3C/svg%3E") left center / contain no-repeat;
}
.hero h1 .stroke { color: var(--gold-ink); }

/* header: centered maison-style wordmark */
.brand span { font-family: var(--caps); font-size: 1.05rem; letter-spacing: .32em; text-transform: uppercase; }
.nav a { letter-spacing: .22em; font-size: .72rem; background-image: linear-gradient(var(--gold), var(--gold)); }
@media (min-width: 761px) {
  .site-header { position: relative; flex-direction: column; gap: 22px; padding: 30px var(--gutter) 0; background: none; backdrop-filter: none; }
  .site-header::after { height: 4px; background: none; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); opacity: 1; }
  .brand { flex-direction: column; gap: 12px; }
  .brand img { width: 68px; height: 68px; }
  .nav { padding-bottom: 20px; }
}
@media (max-width: 760px) {
  .brand span { display: inline; font-size: .82rem; letter-spacing: .26em; }
  .site-header::after { background: var(--gold); }
}

/* buttons: ink with a gold hairline frame */
.btn { outline: 1px solid var(--gold); outline-offset: 4px; letter-spacing: .2em; padding: 17px 26px; }
.btn:hover { background: var(--ink); color: var(--paper); outline-color: var(--ink); }

/* photographs: warm sepia prints, matted and framed in gold */
.ink-photo { filter: grayscale(.85) sepia(.28) contrast(1.05) brightness(.98); mix-blend-mode: normal; }
.hero figure img, .split > figure img, .pillar img, .chapter-side img, .work-mark img {
  padding: 10px; background: #fbf8f1; border: 1px solid var(--gold);
  box-shadow: 0 34px 50px -34px rgba(60, 38, 12, .5);
}
.chapter-side::before { border-color: var(--gold); border-width: 1px; }
.grid img { filter: grayscale(.75) sepia(.25) contrast(1.05); }
.grid a { outline: 1px solid transparent; outline-offset: 3px; transition: outline-color .4s; }
.grid a:hover { outline-color: var(--gold); }

/* drop caps on the biographies */
.prose > p:first-child:not(.eyebrow)::first-letter {
  float: left; font: 400 4.7em/.78 var(--display); color: var(--gold-ink); padding: .1em .12em 0 0;
}

/* rules become fine gold hairlines */
.chapter, .work, .set, .pillars { border-top-color: var(--gold); }
.tracks li { border-bottom-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.price { color: var(--gold-ink); border-color: var(--gold); }
input, textarea { border-bottom-color: var(--gold); }

/* the dark ink band (home) */
.noir { background: var(--noir); color: #efe6d4; }
.noir .pillars { border-top-color: color-mix(in srgb, var(--gold-lit) 50%, transparent); }
.noir .pillar + .pillar { border-left-color: color-mix(in srgb, var(--gold-lit) 35%, transparent); }
.noir .pillar img { background: #241c13; border-color: color-mix(in srgb, var(--gold-lit) 60%, transparent); box-shadow: none; }
.noir h3 { color: var(--gold-lit); font-style: italic; }
@media (max-width: 860px) { .noir .pillar + .pillar { border-top-color: color-mix(in srgb, var(--gold-lit) 35%, transparent); } }

/* video panels */
.video { background: var(--noir); outline: 1px solid var(--gold); outline-offset: 6px; }
.video .play { border-color: var(--gold-lit); color: var(--gold-lit); }

/* footer: dark, monogram and slogan centered */
.site-footer { background: var(--noir); color: #efe6d4; margin-top: clamp(48px, 8vw, 96px); padding-top: 72px; }
.site-footer .row { border-top-color: color-mix(in srgb, var(--gold-lit) 45%, transparent); }
.site-footer small { color: #b3a68f; }
.footer-brand { text-align: center; margin-bottom: 48px; }
.footer-brand img { margin: 0 auto 14px; filter: invert(1) sepia(.5) saturate(1.6) brightness(.9); }
.footer-brand p { margin: 0; font: 400 1rem var(--caps); letter-spacing: .32em; text-transform: uppercase; }
.footer-brand .footer-slogan { font: italic 400 1.5rem var(--display); letter-spacing: 0; text-transform: none; color: var(--gold-lit); margin-top: 6px; }

/* checkout note appears only once a Stripe Payment Link is set on the buy button */
.buy-note { display: none; font: italic 400 1.05rem var(--display); color: var(--muted); margin: 14px 0 0; }
.work:has(a[href*="buy.stripe.com"]) .buy-note { display: block; }
.hero-grid h1 { font-size: clamp(3rem, 7vw, 6.2rem); }
.hero-grid h1 .stroke { font-size: .78em; margin-top: .12em; }
.eyebrow { line-height: 1.7; }
@media (max-width: 600px) { .eyebrow::before { width: 22px; margin-right: 10px; } }
