/* 1. Design tokens and base */
:root {
  /* Exact type scale; rem values respect browser text preferences. */
  --type-h1: 2.5rem;
  --type-h1-line: 2.75rem;
  --type-h2: 2rem;
  --type-h2-line: 2.5rem;
  --type-h3: 1.75rem;
  --type-h3-line: 2.25rem;
  --type-lead: 1.5rem;
  --type-lead-line: 2rem;
  --type-body: 1rem;
  --type-body-line: 1.625rem;
  --type-ui: 0.875rem;
  --type-ui-line: 1.25rem;
  --type-small: 0.75rem;
  --type-small-line: 1.125rem;

  --ink: #24241f;
  --paper: #ffffff;
  --muted: #6c6a62;
  --accent: #55594b;
  --line: #c8c3b7;
  --surface: #ffffff;
  --font-body: "DM Sans", Arial, sans-serif;
  --font-heading: "Cormorant Garamond", Georgia, serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--type-body);
  line-height: var(--type-body-line);
}
a {
  color: inherit;
  text-underline-offset: 5px;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: var(--type-h3-line);
  letter-spacing: -0.02em;
  text-wrap: balance;
  font-size: var(--type-h3);
}
h1 {
  font-size: var(--type-h1);
  margin: 24px 0;
  line-height: var(--type-h1-line);
}
h1 em {
  font-weight: 400;
}
h2 {
  font-size: var(--type-h2);
  margin: 20px 0 32px;
  line-height: var(--type-h2-line);
}
h3 {
  font-size: var(--type-h3);
  margin: 16px 0;
}
p {
  text-wrap: pretty;
}
.eyebrow {
  font-size: var(--type-small);
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: var(--type-small-line);
}
.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 30;
  transform: translateY(-180%);
  padding: 10px 16px;
  background: var(--paper);
}
.skip-link:focus {
  transform: translateY(0);
}
/* 2. Main navigation */
.main-nav {
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  min-height: 64px;
  padding: 12px 16px;
}
.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px;
  text-decoration: none;
  font-size: var(--type-ui);
  letter-spacing: 0.025em;
  line-height: var(--type-ui-line);
}
.main-nav a:is(:hover, [aria-current="location"]) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}
.main-nav a[aria-current="location"] {
  font-weight: 500;
}
/* 3. Full-canvas Procreate layers, all in the same 1440 × 900 coordinates. */
.hero {
  width: 100%;
  margin: 0;
  padding: 0;
}
.scene-frame {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 1440 / 900;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.scene-canvas {
  position: absolute;
  width: 1440px;
  height: 900px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(var(--scene-scale, 1));
  transform-origin: center;
  visibility: hidden;
}
.scene-canvas.is-sized {
  visibility: visible;
}
.scene-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.scene-object {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}
.scene-object:is(:hover, :focus-visible) {
  z-index: 2;
}
.object-hit {
  position: absolute;
  left: var(--hit-left);
  top: var(--hit-top);
  width: var(--hit-width);
  height: var(--hit-height);
  pointer-events: auto;
  cursor: pointer;
}
.scene-object:focus-visible {
  outline: none;
}
.scene-object:focus-visible .object-hit {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.object-effect,
.object-label {
  opacity: 0;
  transition: opacity 0.65s ease;
}
.scene-object:is(:hover, :focus-visible) :is(.object-effect, .object-label) {
  opacity: 1;
}
.scene-compass .object-effect {
  opacity: 1;
  transform-origin: 63.784722% 46.277778%;
}
.scene-compass:is(:hover, :focus-visible) .object-effect {
  animation: needle-turn 1.4s ease-in-out both;
}
@keyframes needle-turn {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.scene-bracelet .object-effect {
  transform-origin: 75.763889% 55.5%;
}
.scene-bracelet:is(:hover, :focus-visible) .object-effect {
  animation: star-shine 0.9s ease both;
}
@keyframes star-shine {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }
  60% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
/* Swing the painting gently around its top-centre hanging point. */
.scene-painting .object-base {
  transform-origin: 85.868056% 5.444444%;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.scene-painting:is(:hover, :focus-visible) .object-base {
  transform: rotate(-5deg);
}
.scene-laptop .object-base {
  transform-origin: 45.625% 41.666667%;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.scene-laptop:is(:hover, :focus-visible) .object-base {
  transform: scale(1.18);
}
/* ENVELOPE — reveal the address from left to right.
   Coordinates account for the PNG's full 1440 × 900 canvas. */

.scene-envelope .object-effect {
  opacity: 1;
  transform: none;
  clip-path: inset(0 77% 0 23%);
  transition: clip-path 1s ease-in-out;
}

.scene-envelope:is(:hover, :focus-visible) .object-effect {
  opacity: 1;
  transform: none;
  clip-path: inset(0 64% 0 23%);
}


/* CAFÉ CUP — heart floats upward and gently grows.
   Transform origin stays near the cup within the full canvas. */

.scene-cup .object-effect {
  opacity: 0;
  transform-origin: 63% 61%;
  transform: translateY(8px) scale(0.85);
  transition:
    opacity 0.6s ease,
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.scene-cup:is(:hover, :focus-visible) .object-effect {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Replace the held hover pose with two gentle movements */
.scene-book:is(:hover, :focus-visible, :focus-within) .object-effect {
  transform: none;
  animation: pen-wiggle 0.4s ease-in-out 2;
}

@keyframes pen-wiggle {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-4px) rotate(-3deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene-book:is(:hover, :focus-visible, :focus-within) .object-effect {
    animation: none;
    transform: none;
  }
}

/* Touchscreens — show both effects without requiring hover. */
@media (hover: none) {
  .scene-envelope .object-effect {
    opacity: 1;
    clip-path: none;
    transform: none;
  }

  .scene-cup .object-effect {
    opacity: 1;
    transform: none;
  }
}

/* Reduced motion — reveal immediately, without movement. */
@media (prefers-reduced-motion: reduce) {
  .scene-envelope .object-effect,
  .scene-cup .object-effect {
    transition: none;
  }

  .scene-cup .object-effect {
    transform: none;
  }
}
.scene-tooltip {
  position: absolute;
  left: var(--hit-left);
  top: calc(var(--hit-top) + var(--hit-height) + 1%);
  padding: 5px 12px;
  background: white;
  color: var(--ink);
  font: 14px/20px var(--font-body);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.scene-object:is(:hover, :focus-visible) .scene-tooltip {
  opacity: 1;
}
/* 6. Editorial content and project previews */
.scene-bottom {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 12px 4% 24px;
  font-family: var(--font-body);
}
.scene-bottom .scene-welcome {
  margin: 0;
  font-size: var(--type-lead);
  line-height: var(--type-lead-line);
  font-weight: 400;
  color: var(--ink);
}
.scene-bottom .scene-description {
  text-align: right;
  color: var(--muted);
}

@media (max-width: 760px) {
  .scene-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .scene-bottom .scene-description {
    text-align: left;
    color: var(--muted);
  }
}
.hint {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 18px;
  color: var(--muted);
  letter-spacing: 0;
}
.intro {
  max-width: 900px;
  margin: 0 auto;
  padding: 85px 24px 10px;
  text-align: center;
}
.intro > p:last-child {
  max-width: 65ch;
  margin: 0 auto;
  color: var(--muted);
}
.work-section,
.about-section,
.art-section {
  max-width: 1150px;
  margin: 0 auto;
  padding: 90px 35px;
  text-align: center;
  scroll-margin-top: 24px;
}
/* Project journal: alternating object studies with offset editorial stories. */
.work-section {
  text-align: left;
}
.work-heading {
  max-width: 640px;
}
.work-heading h2 {
  font-size: var(--type-h2);
  line-height: var(--type-h2-line);
}
.work-heading h2 em {
  font-weight: 400;
}
.work-heading > p:last-child {
  color: var(--muted);
}
.project-index {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin: 44px 0 24px;
  padding: 20px 0;
}
.project-index > span {
  margin-right: auto;
  font-size: var(--type-small);
  letter-spacing: 0.1em;
  line-height: var(--type-small-line);
}
.project-index a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: var(--type-ui);
  text-decoration: none;
  line-height: var(--type-ui-line);
}
.project-index a:hover {
  text-decoration: underline;
}
.projects {
  display: block;
  margin-top: 0;
}
.project-spread {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: clamp(28px, 6vw, 85px);
  align-items: center;
  padding: 72px 0;
  scroll-margin-top: 30px;
}
.project-art {
  position: relative;
  min-width: 0;
  height: 390px;
  display: grid;
  place-items: center;
}
.folio {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-heading);
  font-size: 100px;
  line-height: 1;
  color: #a9a393;
}
.art-mount {
  display: grid;
  place-items: center;
  width: 76%;
  height: 320px;
  background: #e9eadf;
  border-radius: 48% 48% 4px 4px;
  transform: rotate(-5deg);
}
.art-mount img {
  display: block;
  position: absolute;
  max-width: none;
  object-fit: fill;
}
.project-spread:hover .project-cutout {
  transform: translateY(-8px) rotate(1deg);
}
.object-note {
  position: absolute;
  bottom: 4px;
  left: 10%;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.25rem;
  transform: rotate(-5deg);
  line-height: 1.75rem;
}
.collection-stamp {
  position: absolute;
  bottom: 40px;
  right: 0;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 1px solid #9d998d;
  border-radius: 50%;
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: 0.08em;
  text-align: center;
  transform: rotate(13deg);
}
.project-story {
  padding: 12px 0;
  min-width: 0;
}
.project-story .eyebrow {
  font-size: var(--type-small);
  letter-spacing: 0.08em;
  line-height: var(--type-small-line);
}
.project-story h3 {
  font-size: var(--type-h3);
  margin: 16px 0 24px;
  line-height: var(--type-h3-line);
}
.project-headline {
  font-family: var(--font-heading);
  font-size: var(--type-lead);
  line-height: var(--type-lead-line);
  margin: 0 0 22px;
}
.project-description {
  max-width: 42ch;
  color: var(--muted);
  font-size: 16px;
}
.project-topics {
  font-size: var(--type-small);
  color: var(--muted);
  line-height: var(--type-small-line);
  margin: 22px 0;
}
.project-note {
}
.project-note summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 15px 0;
  list-style: none;
  cursor: pointer;
  font-size: var(--type-ui);
  line-height: var(--type-ui-line);
}
.project-note summary::-webkit-details-marker {
  display: none;
}
.project-note summary span {
  font-size: 21px;
  transition: transform 0.2s;
}
.project-note[open] summary span {
  transform: rotate(45deg);
}
.project-note summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.project-note p {
  margin: 0 0 20px;
  font-size: var(--type-ui);
  color: var(--muted);
  line-height: var(--type-ui-line);
}
.preview-status {
  font-size: var(--type-small);
  color: var(--muted);
  margin-top: 20px;
  line-height: var(--type-small-line);
}
.project-spread:nth-child(2) {
  grid-template-columns: 1fr 1.08fr;
}
.project-spread:nth-child(2) .project-art {
  order: 2;
}
.project-spread:nth-child(2) .art-mount {
  border-radius: 50%;
  background: #e5e3ec;
  transform: rotate(5deg);
}
.project-spread:nth-child(2) .folio {
  left: auto;
  right: 0;
}
.project-spread:nth-child(2) .object-note {
  left: 0;
  transform: rotate(4deg);
}
.project-spread:nth-child(3) .art-mount {
  border-radius: 4px;
  background: #eee2dd;
  transform: rotate(-7deg);
}
.project-spread:nth-child(3) .collection-stamp {
  transform: rotate(-12deg);
}
.demo-note {
  font-size: var(--type-small);
  color: var(--muted);
  margin-top: 30px;
  line-height: var(--type-small-line);
}
.about-section,
.art-section {
}
.about-section > p:last-child,
.art-section > p:last-child {
  max-width: 65ch;
  margin: auto;
  color: var(--muted);
}
footer {
  max-width: 1250px;
  margin: auto;
  padding: 30px 5%;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  font-size: var(--type-small);
  color: var(--muted);
  line-height: var(--type-small-line);
}
/* Project links retain their own keyboard focus indicator. */
.project-artifact:focus,
.project-artifact:target {
  outline: none;
}
/* 7. Responsive page chrome; illustration geometry remains unchanged */
@media (max-width: 760px) {
  :root {
    --type-h1: 2rem;
    --type-h1-line: 2.375rem;
    --type-h2: 1.75rem;
    --type-h2-line: 2.25rem;
    --type-h3: 1.5rem;
    --type-h3-line: 2rem;
    --type-lead: 1.375rem;
    --type-lead-line: 1.875rem;
    --type-ui: 0.8125rem;
  }

  .main-nav {
    gap: 16px;
    padding: 8px 12px;
  }

  .scene-bottom {
    flex-wrap: wrap;
    font-size: 12px;
    padding: 16px 5%;
  }
  .hint {
    display: none;
  }
  .intro {
    padding: 65px 24px 0;
  }
  .project-index {
    gap: 10px 20px;
    margin-top: 32px;
  }
  .project-index > span {
    flex-basis: 100%;
  }
  .project-spread,
  .project-spread:nth-child(2) {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 44px 0;
  }
  .project-spread:nth-child(2) .project-art {
    order: 0;
  }
  .project-art {
    height: 340px;
  }
  .art-mount {
    height: 280px;
  }
  .folio {
    font-size: 80px;
  }

  .project-story {
    padding: 0;
  }
  .project-story h3 {
    margin-top: 12px;
  }
  .work-section,
  .about-section,
  .art-section {
    padding: 70px 6%;
  }
  }
/* 8. Touch and reduced motion */
@media (hover: none) {
  .object-effect,
  .object-label,
  .scene-tooltip {
    opacity: 1;
  }
  .hint {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scene-painting:is(:hover, :focus-visible) .object-base {
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
  .scene-object:is(:hover, :focus-visible) .object-effect {
    transform: none;
    opacity: 1;
  }
  .project-spread:hover .project-cutout {
    transform: rotate(5deg);
  }
}
/* CSS windows display objects from full-canvas originals without changing PNGs. */
.project-cutout {
  position: relative;
  display: block;
  width: 60%;
  max-width: 240px;
  overflow: hidden;
  transform: rotate(5deg);
  transition: transform 0.5s ease;
}
.scene-painting {
  --hit-left: 82.291667%;
  --hit-top: 5%;
  --hit-width: 7.152778%;
  --hit-height: 14.555556%;
}
.scene-compass {
  --hit-left: 59.305556%;
  --hit-top: 34.555556%;
  --hit-width: 7.986111%;
  --hit-height: 16.888889%;
}
.scene-cup {
  --hit-left: 57.638889%;
  --hit-top: 56.888889%;
  --hit-width: 11.388889%;
  --hit-height: 13.888889%;
}
.scene-bracelet {
  --hit-left: 70.833333%;
  --hit-top: 47.222222%;
  --hit-width: 7.291667%;
  --hit-height: 11.444444%;
}
.scene-book {
  --hit-left: 37.986111%;
  --hit-top: 54.444444%;
  --hit-width: 16.527778%;
  --hit-height: 26.333333%;
}
.scene-envelope {
  --hit-left: 23.472222%;
  --hit-top: 83%;
  --hit-width: 10.486111%;
  --hit-height: 14.777778%;
}
.scene-laptop {
  --hit-left: 35.486111%;
  --hit-top: 28.666667%;
  --hit-width: 20.277778%;
  --hit-height: 26%;
}
.cutout-cafe-cup {
  aspect-ratio: 156/117;
}
.cutout-cafe-cup img {
  width: 923.076923%;
  height: 769.230769%;
  left: -534.615385%;
  top: -441.025641%;
}
.cutout-compass {
  aspect-ratio: 107/144;
}
.cutout-compass img {
  width: 1345.794393%;
  height: 625%;
  left: -801.869159%;
  top: -218.75%;
}
.cutout-bracelet {
  aspect-ratio: 97/95;
}
.cutout-bracelet img {
  width: 1484.536082%;
  height: 947.368421%;
  left: -1055.670103%;
  top: -451.578947%;
}


/* Case-study entry uses the shared control type scale. */
.case-study-link { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--type-ui); line-height: var(--type-ui-line); text-underline-offset: 5px; }

/* Selected work: map and certificate on the left, menu centred on the right. */
.artifact-collection {
  display: grid;
  grid-template-columns: minmax(0, 2048fr) minmax(0, 1433fr);
  grid-template-rows: auto auto;
  gap: clamp(48px, 7vw, 96px) clamp(32px, 5vw, 72px);
  align-items: center;
  margin-top: 48px;
}
.project-artifact { position: relative; min-width: 0; scroll-margin-top: 32px; }
.project-artifact > img { display: block; width: 100%; height: auto; }
.artifact-map { grid-column: 1; grid-row: 1; }
.artifact-certificate { grid-column: 1; grid-row: 2; }
/* Reciprocal image proportions give equal areas when each image fills its track.
   Both outside edges align with the section content edges. */
.artifact-menu {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 100%;
  justify-self: center;
}
.artifact-copy { position: absolute; inset: 9% 10%; display: flex; flex-direction: column; justify-content: center; }
.artifact-copy .eyebrow { margin: 0 0 6px; font-size: 10px; line-height: 1.5; }
.artifact-copy h3 { margin: 0; }
.artifact-subtitle { font-family: var(--font-heading); font-style: italic; font-size: 20px; line-height: 1.4; margin: 2px 0 14px; }
.artifact-copy dl { margin: 0; font-size: 12px; line-height: 1.5; }
.artifact-copy dl > div { display: grid; grid-template-columns: 92px 1fr; gap: 8px; margin: 5px 0; }
.artifact-copy dt { font-weight: 500; }
.artifact-copy dd { margin: 0; }
.artifact-status { font-size: 11px; line-height: 1.5; color: var(--muted); margin: 14px 0 0; }
.artifact-menu .artifact-copy { inset: 37% 19% 15%; }
.artifact-menu .artifact-copy > .eyebrow, .artifact-menu h3, .artifact-menu .artifact-subtitle { text-align: center; }
.artifact-menu dl > div { display: block; margin: 12px 0; }
.artifact-menu dt { margin-bottom: 2px; }
.artifact-menu .case-study-link { align-self: center; font-size: 12px; margin-top: 12px; }
.artifact-certificate .artifact-copy { text-align: center; }
.artifact-certificate dl { text-align: left; }
@media (min-width: 761px) and (max-width: 1050px) {
  .artifact-collection { column-gap: 28px; }
  .artifact-copy { inset: 6% 9%; }
  .artifact-copy h3 { font-size: 24px; line-height: 1.2; }
  .artifact-subtitle { font-size: 17px; margin-bottom: 8px; }
  .artifact-copy dl { font-size: 10px; }
  .artifact-copy dl > div { grid-template-columns: 76px 1fr; margin: 3px 0; }
  .artifact-status { margin-top: 8px; font-size: 10px; }
  .artifact-menu dl > div { margin: 8px 0; }
}
@media (max-width: 760px) {
  .artifact-collection { display: flex; flex-direction: column; gap: 44px; }
  .project-artifact { width: 100%; max-width: 560px; }
  .artifact-menu {
    width: calc(100% * 1433 / 2048);
    max-width: calc(560px * 1433 / 2048);
  }
  .artifact-copy { position: relative; inset: auto; padding: 24px 8px 0; }
  .artifact-menu .artifact-copy { inset: auto; }
  .artifact-copy .eyebrow { font-size: 12px; }
  .artifact-copy dl { font-size: 14px; line-height: 1.65; }
  .artifact-copy dl > div { grid-template-columns: 100px 1fr; margin: 8px 0; }
  .artifact-menu dl > div { display: grid; }
  .artifact-menu .artifact-copy > .eyebrow, .artifact-menu h3, .artifact-menu .artifact-subtitle, .artifact-certificate .artifact-copy { text-align: left; }
  .artifact-menu .case-study-link { align-self: flex-start; font-size: 14px; }
  .artifact-status { font-size: 12px; }
}

/* Full project links sit below each drawing, aligned to its left edge. */
.artifact-project-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 12px;
  font-size: var(--type-ui);
  line-height: var(--type-ui-line);
  text-underline-offset: 5px;
}
.project-artifact > img { transform-origin: center; }

.project-artifact:focus-within { z-index: 2; }

