/* Shared quiet shell. Explicit pixels avoid the template's fluid rem scale.
   Keep the scene mounts and Rive nodes intact: their boot owns the 3D work. */
body.clean-portfolio {
  --clean-bg: #100e14;
  --clean-surface: #17131c;
  --clean-ink: #f4f0f6;
  --clean-muted: #b5adbd;
  --clean-accent: #c7a0ee;
  --clean-line: #342b3d;
  background: var(--clean-bg) !important;
  color: var(--clean-ink);
  font-family: "Mona Sans Variable", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
}
body.clean-portfolio .stars-overlay { background: none !important; }
body.clean-portfolio :focus-visible {
  outline: 2px solid var(--clean-accent);
  outline-offset: 5px;
}
body.clean-portfolio .nav {
  position: fixed !important;
  inset: 0 0 auto !important;
  width: 100% !important;
  height: 76px !important;
  min-height: 0 !important;
  z-index: 60 !important;
  background: #100e14 !important;
  border-bottom: 1px solid #2a2332;
  backdrop-filter: none;
  transition: background-color .4s ease, border-color .4s ease;
}
body.clean-portfolio .nav .nav-inner {
  display: flex;
  align-items: center !important;
  justify-content: flex-start;
  height: 76px !important;
  min-height: 0 !important;
  gap: 24px;
  padding: 0 clamp(20px, 5vw, 88px) !important;
}
body.clean-portfolio .nav .nav-brand-link,
body.clean-portfolio .nav .nav-brand {
  flex: 0 0 44px;
  width: 44px !important;
  height: 54px !important;
  min-width: 0 !important;
  margin: 0 !important;
}
/* The original mobile template hides the brand and gives its button group
   the entire row. Keep a visible Home target and leave room for languages. */
body.clean-portfolio .nav .nav-brand-link {
  order: 0;
  display: inline-flex !important;
  align-items: center;
  pointer-events: auto;
}
body.clean-portfolio .nav .nav-brand { background-size: contain !important; }
body.clean-portfolio .nav .page-edge-pos { display: none !important; }
body.clean-portfolio .nav .clean-nav-links { display: none !important; }
body.clean-portfolio .nav [data-lang-switch] {
  order: 2;
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 0 0 auto !important;
  font-size: 13px !important;
  color: #79717f;
  pointer-events: auto !important;
}
body.clean-portfolio .nav [data-lang-switch] button {
  padding: 10px 5px;
  min-width: 32px;
  min-height: 44px;
  font-size: 13px !important;
  line-height: 20px;
  color: #b5adbd;
}
body.clean-portfolio .nav [data-lang-switch] button.is-on,
body.clean-portfolio .nav [data-lang-switch] button[aria-pressed="true"] { color: var(--clean-accent); }
body.clean-portfolio .nav .btn-layout.is-nav,
body.clean-portfolio .nav .nav-ham { order: 3; flex: none; }
body.clean-portfolio .nav .btn-layout.is-nav { width: auto !important; justify-content: flex-end; }
body.clean-portfolio .nav .nav-ham {
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  border: 1px solid #544061 !important;
  border-radius: 10px;
  background: #c7a0ee !important;
}
body.clean-portfolio .nav .nav-rive-w { width: 44px; height: 44px; }
body.clean-portfolio .nav-menu-w { background: #19121f !important; }
body.clean-portfolio .nav-menu-bg { background-image: none !important; }
body.clean-portfolio .edge-ui { padding-top: 76px; font-size: 16px; }

/* Only the surrounding layout changes; ui.js retains scene geometry,
   full-viewport mounts, framing and pointer correction. */
body.clean-portfolio.edge-ready .home .hero {
  position: relative;
  min-height: max(530px, calc(var(--head-bottom, 86vh) - 76px));
  padding: clamp(58px, 8vh, 96px) 0 50px;
  align-items: flex-start;
}
body.clean-portfolio.edge-ready .home .hero::before {
  background: linear-gradient(90deg, #100e14 0%, rgba(16,14,20,.96) 24%, rgba(16,14,20,.66) 41%, transparent 64%);
}
body.clean-portfolio .home .hero .container,
body.clean-portfolio.edge-ready .panels-wrap {
  max-width: 1600px;
  padding-left: clamp(24px, 7vw, 112px);
  padding-right: clamp(24px, 7vw, 112px);
  margin-inline: auto;
}
body.clean-portfolio .hero-inner { gap: 32px; }
body.clean-portfolio.edge-ready .hero-copy { max-width: 550px; width: 46%; }
body.clean-portfolio .hero-copy > * + * { margin-top: 0; }
body.clean-portfolio.edge-ready .hero-copy .eyebrow {
  margin: 0 0 22px;
  max-width: 460px;
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 1.8px;
  color: #a89cac;
}
body.clean-portfolio.edge-ready .hero-copy .display {
  margin: 0 0 28px;
  font-size: clamp(46px, 4.6vw, 74px);
  line-height: 1.02;
  letter-spacing: -1.5px;
  color: var(--clean-ink);
}
body.clean-portfolio.edge-ready .hero-copy .lead {
  max-width: 30ch;
  margin: 0 0 30px;
  font-size: clamp(19px, 1.5vw, 23px);
  line-height: 1.5;
  letter-spacing: -.5px;
  color: #cfc6d5;
}
body.clean-portfolio .hero-focus {
  margin: 0 0 6px;
  color: var(--clean-accent);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}
body.clean-portfolio .hero-stack {
  margin: 0 0 28px;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .3px;
  color: #a79bab;
}
body.clean-portfolio.edge-ready .hero-copy .status {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 26px;
  padding: 10px 15px;
  border: 1px solid #9860be;
  border-radius: 999px;
  background: #34203f;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  color: #f7edff;
}
body.clean-portfolio .status-dot {
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--clean-accent);
  box-shadow: none;
  animation: none;
}
body.clean-portfolio.edge-ready .hero-links { gap: 14px 26px; margin: 0; }
body.clean-portfolio.edge-ready .hero-copy .arrow-link { font-size: 14px; line-height: 1.6; color: #bdb2c5; }
body.clean-portfolio .hero-links .arrow-link:first-child { color: var(--clean-ink); }
body.clean-portfolio .hero-links .arrow-link span { color: inherit; }
body.clean-portfolio .hero-links .arrow-link::after { background: var(--clean-accent); }
body.clean-portfolio .home > .rule { border-color: #2b2432; }

/* A deliberate light chapter under the portrait, echoed by the shared bar. */
body.clean-portfolio.edge-ready .panels-wrap[data-surface="light"] {
  --clean-bg: #f1edf7;
  --clean-ink: #241a30;
  --clean-accent: #75439a;
  max-width: none;
  color: var(--clean-ink);
  padding-top: 32px;
  padding-bottom: 48px;
}
body.clean-portfolio.edge-ready .panels-wrap[data-surface="light"] .otot-card { border-color: #c9bdd4; }
body.clean-portfolio.edge-ready .panels-wrap[data-surface="light"] .otot-card:hover { border-color: #75439a; }
body.clean-portfolio.edge-ready .panels-wrap[data-surface="light"] .otot-card .text-impact-reg-brier { color: #241a30; }
body.clean-portfolio.edge-ready .panels-wrap[data-surface="light"] .otot-card .text-body-reg-mona { color: #64546f; }
body.clean-portfolio[data-active-surface="light"] .nav { background: #f1edf7 !important; border-color: #d4c9de; }
body.clean-portfolio[data-active-surface="light"] .clean-nav-links a { color: #64546f; }
body.clean-portfolio[data-active-surface="light"] .clean-nav-links a:hover,
body.clean-portfolio[data-active-surface="light"] .clean-nav-links a[aria-current="page"] { color: #6e3595; }
body.clean-portfolio[data-active-surface="light"] .nav [data-lang-switch] { color: #9c8ba9; }
body.clean-portfolio[data-active-surface="light"] .nav [data-lang-switch] button { color: #64546f; }
body.clean-portfolio[data-active-surface="light"] .nav [data-lang-switch] button.is-on,
body.clean-portfolio[data-active-surface="light"] .nav [data-lang-switch] button[aria-pressed="true"] { color: #6e3595; }
body.clean-portfolio[data-active-surface="light"] .nav :focus-visible { outline-color: #6e3595; }

/* Low, editorial navigation with a little of the original VR personality. */
body.clean-portfolio.edge-ready .panels-wrap { padding-top: 38px; padding-bottom: 44px; background: var(--clean-bg); }
body.clean-portfolio.edge-ready .panels { gap: 40px; padding-bottom: 0; }
body.clean-portfolio.edge-ready .otot-card {
  display: flex;
  align-items: center;
  min-height: 300px;
  padding: 24px 0;
  border: 0;
  border-top: 1px solid #3b3044;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}
body.clean-portfolio.edge-ready .otot-card:hover { background: transparent; border-color: #c7a0ee; }
/* 56% leaves the figure its room and holds the description to roughly 48
   characters a line, so both cards wrap to two lines and read as a pair. */
body.clean-portfolio.edge-ready .otot-card-text { max-width: 52%; padding-right: 20px; }
body.clean-portfolio.edge-ready .otot-card .text-impact-reg-brier {
  display: block;
  margin: 0 0 14px;
  font-size: clamp(30px, 2.5vw, 40px);
  line-height: 1.1;
  letter-spacing: -.8px;
  text-transform: none;
}
body.clean-portfolio.edge-ready .otot-card .text-body-reg-mona {
  display: block;
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.65;
  color: #b5aabc;
}
body.clean-portfolio .otot-card :is(.text-impact-reg-brier, .text-body-reg-mona)::after { display: none; }
body.clean-portfolio.edge-ready .otot-btn {
  width: 32px;
  height: 24px;
  border-radius: 0;
  background: none;
  color: var(--clean-accent);
  box-shadow: none;
}
/* The cutouts are 1080x1350 and the top 275px of each is transparent, so only
   the lower 80% of the file is actually her. Sized by width they came out
   taller than the card and overflow clipped her head. Sized by height instead,
   and overscaled to 116% so that empty fifth hangs above the card rather than
   inside it: the figure reads about a quarter larger, and the only thing
   overflow trims is transparent pixels. Both files are framed the same, so one
   rule keeps the pair at a matched scale. */
body.clean-portfolio.edge-ready .otot-card-img {
  width: auto;
  height: 116%;
  max-width: 48%;
  right: -8px;
  bottom: 0;
  opacity: 1;
}
/* The arrow lost its filled pill up in .otot-btn, so the glow the shared
   stylesheet raises on hover had nothing to sit on. */
body.clean-portfolio.edge-ready .otot-card:hover .otot-btn { box-shadow: none; }
/* Visibility, rather than removal, leaves the template's Rive boot intact. */
body.clean-portfolio.edge-ready .panels-wrap > .s.home-marquee { visibility: hidden; opacity: 0; pointer-events: none; }

/* The original shared footer retains its layout, artwork and animation. */

@media (max-width: 1023px) {
  body.clean-portfolio .home-hero-touch-controls-w { display: none !important; }
  body.clean-portfolio.edge-ready .home .hero { min-height: 0; padding: 48px 0 0; }
  body.clean-portfolio.edge-ready .hero-copy { width: 100%; max-width: 470px; }
  body.clean-portfolio.edge-ready .hero-slot { width: 100%; max-width: 460px; height: clamp(360px, 108vw, 460px); aspect-ratio: auto; align-self: center; }
  body.clean-portfolio.edge-ready .home .hero::before { background: none; }
  body.clean-portfolio .nav .nav-inner { gap: 18px; }
  /* Two columns below this leave each card near 330px, which squeezes the
     description to four lines and shrinks the figure against its max-width.
     One column per row keeps the measure and the figure intact. */
  body.clean-portfolio.edge-ready .panels { grid-template-columns: 1fr; gap: 16px; }
  body.clean-portfolio.edge-ready .otot-card-text { max-width: 58%; }
}
@media (max-width: 700px) {
  body.clean-portfolio .nav .nav-inner { padding-inline: 20px !important; gap: 12px; }
  body.clean-portfolio .nav [data-lang-switch] { margin-left: auto !important; margin-right: 2px !important; }
  body.clean-portfolio .nav .nav-ham { width: 44px !important; height: 44px !important; }
  body.clean-portfolio.edge-ready .home .hero { min-height: 0; padding: 44px 0 0; }
  body.clean-portfolio.edge-ready .hero-copy { max-width: 100%; }
  body.clean-portfolio.edge-ready .hero-copy .display { max-width: 340px; font-size: clamp(42px, 11vw, 66px); line-height: 1.06; margin-bottom: 24px; }
  body.clean-portfolio.edge-ready .hero-copy .eyebrow { max-width: 280px; margin-bottom: 20px; font-size: 10px; }
  body.clean-portfolio.edge-ready .hero-copy .lead { font-size: 19px; max-width: 27ch; margin-bottom: 26px; }
  body.clean-portfolio .hero-focus { font-size: 13px; }
  body.clean-portfolio.edge-ready .hero-copy .status { max-width: 310px; font-size: 12px; }
  body.clean-portfolio.edge-ready .panels-wrap,
  body.clean-portfolio.edge-ready .panels-wrap[data-surface="light"] { padding-top: 18px; padding-bottom: 28px; }
  body.clean-portfolio.edge-ready .panels { grid-template-columns: 1fr; gap: 14px; }
  body.clean-portfolio.edge-ready .otot-card { min-height: 260px; padding: 24px 0; }
  body.clean-portfolio.edge-ready .otot-card-text { max-width: 54%; padding-right: 14px; }
  body.clean-portfolio.edge-ready .otot-card .text-impact-reg-brier { font-size: 34px; }
  body.clean-portfolio.edge-ready .otot-card .text-body-reg-mona { font-size: 13px; }
  body.clean-portfolio.edge-ready .otot-card-img { width: auto; height: 114%; max-width: 42%; }
}
@media (prefers-reduced-motion: reduce) {
  body.clean-portfolio :is(.nav, .clean-nav-links a, .otot-card, .otot-card-img, .otot-btn, .arrow-link, .arrow-link span) { transition: none !important; }
  body.clean-portfolio .otot-card:hover :is(.otot-card-img, .otot-btn) { transform: none; }
  body.clean-portfolio .nav-brand:hover img { transform: none; }
}
