/* MINUIT16 — studio site. Light palette below; night mode = whole page inverted, media kept natural. */
@font-face {
  font-family: "TWK Lausanne Pan";
  src: url("../fonts/TWKLausannePan-650.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: rgb(237, 237, 237);
  --panel: rgb(255, 255, 255);
  --ink: rgb(0, 0, 0);
  --grey: rgb(138, 138, 138);
  --accent: #ff7900;
  --pad: 20px;
  --gap: 10px;
  --side: 360px;
  --bar: 75px;
}

* { box-sizing: border-box; margin: 0; padding: 0; min-width: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
html.night { filter: invert(1); background: #fff; }
html.night body { --bg: rgb(248, 248, 248); }
html.night img, html.night video, html.night canvas, html.night .keep { filter: invert(1); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "TWK Lausanne Pan", "Switzer", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}
@media (hover: hover) and (pointer: fine) { body, a, button, input, textarea, [role="button"] { cursor: none; } }
button { font: inherit; color: inherit; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
img, video, canvas { display: block; }
::selection { background: var(--ink); color: var(--panel); }

/* ---------- layout ---------- */
.app {
  height: 100vh; height: 100dvh;
  padding: var(--pad);
  display: flex;
  gap: var(--gap);
}
.side { width: var(--side); flex: none; display: flex; flex-direction: column; gap: var(--gap); }
.side-main { flex: 1; display: flex; flex-direction: column; background: var(--panel); min-height: 0; }
.bar { height: var(--bar); flex: none; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 30px; background: var(--panel); }
.side-content { flex: 1; padding: 0 20px 20px; position: relative; min-height: 0; }
.side-bottom { justify-content: flex-start; }

.gallery { flex: 1; display: flex; flex-direction: column; background: var(--panel); min-height: 0; }
.g-list { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 20px; overscroll-behavior: contain; scrollbar-width: none; }
.g-list::-webkit-scrollbar { display: none; }
.g-cols { display: flex; gap: 10px; align-items: flex-start; }
.g-col { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.g-end { height: 20px; flex: none; }

/* ---------- top bar pieces ---------- */
.loc { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.loc .dot { width: 2px; height: 2px; border-radius: 50%; background: currentColor; }
.menu, .links { display: flex; gap: 20px; }

.ulink { position: relative; display: inline-block; height: 21px; line-height: 20px; overflow: hidden; background: none; padding: 0; }
.ulink::before, .ulink::after {
  content: ""; position: absolute; left: 0; top: 20px; width: 100%; height: 1px; background: currentColor;
  transition: transform .45s cubic-bezier(.65, 0, .35, 1);
}
.ulink::after { transform: translateX(-101%); }
@media (hover: hover) {
  .ulink:hover::before { transform: translateX(101%); }
  .ulink:hover::after { transform: translateX(0); }
}

.controls { display: flex; align-items: center; gap: 16px; }
.daynight { width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; }
.daynight svg { display: block; height: 14px; }
.sound { width: 40px; height: 40px; background: #121211; color: #f4f3ef; display: flex; align-items: center; justify-content: center; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 14px; }
.bars i { display: block; width: 2px; background: currentColor; transform-origin: bottom; transition: height .3s; }
.bars.on i { animation: m16b 1s ease-in-out infinite; }
.bars.on i:nth-child(2) { animation-delay: -.4s; }
.bars.on i:nth-child(3) { animation-delay: -.7s; }
.bars.on i:nth-child(4) { animation-delay: -.2s; }
@keyframes m16b { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* ---------- side tabs ---------- */
.tab { position: absolute; inset: 0 20px 20px; display: flex; flex-direction: column; gap: 20px; }
.tab[hidden] { display: none; }
.tab.enter { animation: tabIn .5s cubic-bezier(.42, 0, .58, 1) both; }
@keyframes tabIn { from { opacity: 0; transform: translateY(20px); } }
.logo { width: 230px; height: 47px; flex: none; }
.logo svg { width: 100%; height: 100%; display: block; overflow: visible; }
.spacer { flex: 1; }

.pbio { display: flex; flex-direction: column; gap: 12px; }
.pbio .photo { width: 65%; aspect-ratio: 1; position: relative; overflow: hidden; pointer-events: none; user-select: none; }
.pbio .photo canvas, .pbio .photo img { width: 100%; height: 100%; object-fit: cover; }
.toggle { width: 28px; height: 28px; display: flex; align-items: center; justify-content: flex-start; transition: transform .45s cubic-bezier(.34, 1.4, .5, 1); }
.toggle .plus { position: relative; width: 14px; height: 14px; }
.toggle .plus::before, .toggle .plus::after { content: ""; position: absolute; background: currentColor; }
.toggle .plus::before { left: 0; top: 6.25px; width: 14px; height: 1.5px; }
.toggle .plus::after { left: 6.25px; top: 0; width: 1.5px; height: 14px; }
.toggle[aria-expanded="true"] .plus { transform: rotate(45deg); }
.toggle .plus { transition: transform .45s cubic-bezier(.34, 1.4, .5, 1); }
.bio { text-wrap: balance; }
.bio[hidden] { display: none; }
.bio.show { animation: tabIn .45s cubic-bezier(.42, 0, .58, 1) both; }

/* ---------- contact ---------- */
.c-text { text-wrap: balance; }
.c-form { display: flex; flex-direction: column; gap: 0; }
.field { position: relative; border-bottom: 1px solid var(--grey); }
.field input, .field textarea {
  display: block; width: 100%; font: inherit; color: var(--ink); background: transparent; border: 0; outline: 0; border-radius: 0;
  padding: 15px 0 10px; resize: none; -webkit-appearance: none; appearance: none;
}
.field input { height: 45px; padding: 15px 0 10px; line-height: 20px; }
.field textarea { height: 90px; padding: 15px 0 10px; }
.field input::placeholder, .field textarea::placeholder { color: var(--grey); opacity: 1; }
.send-row { padding-top: 30px; display: flex; align-items: center; gap: 16px; }
.send { font-size: 15px; }
.status { color: var(--grey); }

/* ---------- covers ---------- */
.cover { position: relative; overflow: hidden; background: var(--bg); cursor: pointer; outline: none; }
.cover img, .cover video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.cover video { opacity: 0; transition: opacity .4s ease; }
.cover video.ready { opacity: 1; }
.cover .ico {
  position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 100px;
  background: var(--panel); display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(.8);
  transition: opacity .3s ease, transform .3s ease; pointer-events: none; z-index: 2;
}
.cover .ico svg { width: 12px; height: 12px; display: block; }
@media (hover: hover) { .cover:hover .ico, .cover:focus-visible .ico { opacity: 1; transform: scale(1); } }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .3s cubic-bezier(.42, 0, .58, 1); }
.lb.open { opacity: 1; pointer-events: auto; }
.lb-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .25); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lb-box { position: relative; background: var(--panel); padding: 10px 10px 0; max-width: 90%; max-height: 90%; display: flex; flex-direction: column; gap: 10px; }
.lb-media { height: 74vh; max-height: calc(90vh - 60px); max-width: 100%; position: relative; }
.lb-media img, .lb-media video { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.lb-cap { display: flex; align-items: center; gap: 2px; height: 20px; margin-bottom: 10px; }
.lb-cap .meta { flex: 1; display: flex; justify-content: flex-end; gap: 6px; color: var(--grey); }
.lb-close { position: absolute; right: -50px; top: 0; width: 40px; height: 40px; border-radius: 100px; background: var(--panel); display: flex; align-items: center; justify-content: center; }
.lb-close svg { width: 12px; height: 12px; display: block; }

/* ---------- cursor & grain ---------- */
.cursor { position: fixed; left: 0; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--accent); z-index: 100; pointer-events: none; opacity: 0; transition: opacity .2s; will-change: transform; }
html.night .cursor { filter: invert(1); }
.cursor.on { opacity: 1; }
@media not ((hover: hover) and (pointer: fine)) { .cursor { display: none; } }
.grain { position: fixed; inset: 0; z-index: 9; pointer-events: none; overflow: hidden; }
.grain div { position: absolute; left: 0; top: 0; width: calc(100% + 120px); height: calc(100% + 120px); background-size: 120px 120px; opacity: .045; will-change: transform; }

/* view transition for day/night */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .7s; animation-timing-function: ease; }

/* ---------- mobile ---------- */
@media (max-width: 809.98px) {
  body { overflow: auto; }
  .app { height: auto; padding: 10px; flex-direction: column; }
  .side { width: 100%; }
  .bar { height: 60px; padding: 0 15px; }
  .side-content { padding: 0 15px 30px; min-height: 585px; }
  .tab { inset: 0 15px 30px; }
  .side-bottom { padding: 0 15px; }
  .gallery { min-height: 0; }
  .g-list { overflow: visible; padding: 0 15px 15px; }
  .g-cols { flex-direction: column; gap: 8px; }
  .g-col { gap: 8px; width: 100%; }
  .g-end { display: none; }
  .lb-close { right: 0; top: -50px; }
  .lb-media { height: auto; max-height: 70vh; }
  .lb-media img, .lb-media video { width: 100%; height: auto; max-height: 70vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
