/* Shared extras for every page. Page-specific styles live inside each page. */
[hidden] { display: none !important; }

/* Soft fade-in when a page loads */
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
body { animation: pageIn .6s ease both; }

/* Project switcher menu (project pages) */
.menu[data-switch] { position: absolute; top: 100%; left: 0; z-index: 40; margin-top: 8px; }

/* Gentle 3D tilt on gallery cards (set by site.js) */
.card .card-img, .tile { transition: transform .45s cubic-bezier(.2, .7, .2, 1); transform-style: preserve-3d; will-change: transform; }

/* Respect people who turn motion off */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .rv { opacity: 1 !important; transform: none !important; }
}

/* Headings never split a word across lines. If a word is too wide for the screen,
   site.js shrinks that heading slightly until it fits (see "Fit headings"). */
h1, h2, h3, h4, .h, .hp { overflow-wrap: normal; word-break: normal; hyphens: manual; }
html, body { overflow-x: clip; }

/* Phones: smaller Let's talk button so it covers less text */
@media (max-width: 600px) {
  .lt { transform: scale(.72); transform-origin: bottom right; }
}

/* Phones: Resume columns stack, so the left column must not stay pinned (it overlapped the experience text) */
@media (max-width: 760px) {
  .sticky { position: static !important; }
}

/* Page switch: the page fades out, then the next page fades in (the fade-in above).
   Script is in site.js. */
@keyframes pageOut { from { opacity: 1; } to { opacity: 0; } }
html.sk-leaving body { animation: pageOut .28s ease forwards; }

/* First visit loader: covers the page until images and fonts are in (min 1s, max 5s).
   Only shows once per visit. Script is in site.js. */
html.sk-load { overflow: hidden; }
/* the loader sits inside body, so skip the page fade-in while it shows (it was fading the bar out of view) */
html.sk-load body { animation: none; }
html.sk-load::before { content: ""; position: fixed; inset: 0; z-index: 2147483645; background: #fff url(img/sk-logo.png) no-repeat center calc(50% - 14.5px) / 74px auto; }
.sk-loader { position: fixed; inset: 0; z-index: 2147483646; display: grid; place-items: center; background: #fff;
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1), visibility .7s; }
.sk-loader .in { display: flex; flex-direction: column; align-items: center; gap: 26px; transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .5s; }
.sk-loader img { width: 74px; height: auto; animation: skBreathe 1.8s ease-in-out infinite; }
.sk-loader .bar { position: relative; width: 220px; height: 6px; border-radius: 6px; overflow: hidden; background: rgba(0, 0, 0, .1); }
.sk-loader .bar i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p, .04)); transition: transform .45s cubic-bezier(.2, .7, .2, 1);
  background: linear-gradient(90deg, #ED217C 0 25%, #13A89E 25% 50%, #7D8AD0 50% 75%, #F26A21 75% 100%); }
.sk-loader.done { opacity: 0; visibility: hidden; }
.sk-loader.done .in { transform: translateY(-14px); opacity: 0; }
@keyframes skBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .sk-loader img { animation: none; } }

/* Phones: the "I specialize in" switcher (all homes). Smaller so the longest title
   ("Industrial / Product Design") and its arrow fit on one line without touching. */
@media (max-width: 600px) {
  .sp-btn { font-size: 5.6vw !important; }
  .sp-btn > span:first-child { perspective-origin: 0 50% !important; } /* keep the 3D flip text on the left margin */
  .sp-btn .arw { margin-left: .4em; }
}

/* Phones: Home B (list view) project rows. Smaller thumbnails and names so nothing
   runs into the arrow; scope and year columns are hidden. */
@media (max-width: 760px) {
  .row { grid-template-columns: 28px 76px minmax(0, 1fr) 20px !important; gap: 12px !important; padding: 12px 4px !important; }
  .row img { width: 76px !important; height: 54px !important; }
  .row .h { font-size: clamp(19px, 6vw, 26px) !important; line-height: 1.02; overflow-wrap: normal; }
  .row .b { font-size: 12px !important; }
  .opt-head { grid-template-columns: 28px 76px minmax(0, 1fr) 20px !important; gap: 12px !important; padding: 0 4px 10px !important; }
  .opt-head span:nth-child(4), .opt-head span:nth-child(5) { display: none; }
}

/* Rip protection (deterrent): no saving images by long-press, right-click or drag,
   no text selection except contact details and form fields. Screenshots can't be blocked. */
img, video, svg, canvas { -webkit-user-drag: none; -webkit-touch-callout: none; }
body { -webkit-user-select: none; user-select: none; }
input, textarea, [contenteditable], a[href^="mailto"], a[href^="tel"] { -webkit-user-select: text; user-select: text; }

/* Phones: when the bottom toolbar (Top / Next project) slides up, lift the
   Let's talk button above it so the two never overlap. */
@media (max-width: 760px) {
  .lt { transition: bottom .45s cubic-bezier(.34, 1.56, .64, 1); }
  html:has(.tb.tb-on) .lt { bottom: 100px !important; }
}
.cue{animation:cueFade 1.6s ease-in-out infinite}@keyframes cueFade{45%,88%{background-color:#fff}}@media (prefers-reduced-motion:reduce){.cue{animation:none}}

/* nav item colors: Art */
.c-yellow{color:#E8B100}
