/* Fusion page only (index-fusion.html): the water hero with the 3D devices on
   the project card. Loaded after elevate.css.

   The card is now one object: its header, the device, and the project's name,
   description and button all live inside the same sheet of glass. */

/* The home page uses the same column as the project pages (1180px), so the nav
   bar and the content share their edges on every page. */
.hero { padding-top: 96px; padding-bottom: 20px; gap: clamp(32px, 4vw, 64px); }
.hero__name { font-size: clamp(54px, 6.9vw, 102px); }
.hero__tagline { max-width: 26ch; font-size: clamp(19px, 1.7vw, 23px); }

/* ─── One card that holds everything ─────────────────────────────────── */
.showcase {
  perspective: none;
  padding: 10px 18px 18px;
  border-radius: 28px;
  background:
    radial-gradient(70% 45% at 50% 34%, rgba(255, 255, 255, 0.8), transparent 70%),
    radial-gradient(90% 60% at 50% 110%, rgba(120, 150, 220, 0.14), transparent 70%),
    rgba(238, 243, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.9);
  /* No blur behind the card. The nav bar has its own glass, and a blurred nav
     passing over a blurred card that holds a live 3D canvas makes Chrome
     flicker while scrolling. A more solid tint gives the same frosted look. */
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 0 0 1px rgba(17, 17, 20, 0.05),
    0 40px 70px -40px rgba(30, 30, 120, 0.45);
}
.showcase__head { margin-bottom: 0; }
.showcase__arrow { width: 40px; height: 40px; }
.showcase__label, .showcase__count { color: #50505C; font-weight: 500; }

/* The stage is now just the open space the device stands in */
.showcase__stage,
.showcase__stage.has-3d {
  height: clamp(280px, calc(100svh - 346px), 680px);
  background: none; border: 0; box-shadow: none; border-radius: 18px;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  transform: none;
}
.showcase__stage::after { display: none; }

/* The 3D scene fills the stage. It sits above the slides, which stay clickable. */
.fusion-scene { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.fusion-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* The ground shadow is drawn before the canvas, so it always sits behind the device */
.fusion-scene::before {
  content: ""; position: absolute; left: 28%; right: 28%; bottom: 9%; height: 5%;
  border-radius: 50%; background: rgba(30, 30, 110, 0.3); filter: blur(14px);
}
/* Flat screenshots stay out of sight while 3D is in charge */
.fusion-3d .slide__shot { opacity: 0 !important; }

/* Project label, then the title with the button on the same line, then the
   description across the full width of the card */
.showcase__info { position: relative; margin-top: 2px; }
.showcase__info .showcase__cta { position: absolute; top: 18px; right: 0; bottom: auto; min-height: 46px; padding: 0 18px 0 20px; border-radius: 12px; }
.showcase__title { margin-top: 2px; padding-right: 190px; font-size: 24px; line-height: 46px; white-space: nowrap; }
.showcase__desc { margin-top: 6px; max-width: none; }

:root[data-contrast="more"] .showcase { background: var(--white); border-color: var(--ink); -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (forced-colors: active) {
  .fusion-scene { display: none; }
  .fusion-3d .slide__shot { opacity: 1 !important; }
}
@media (max-width: 960px) {
  .hero { padding-top: 168px; }
  .showcase__stage, .showcase__stage.has-3d { height: clamp(280px, 46svh, 460px); aspect-ratio: auto; }
}
@media (max-width: 767px) {
  .showcase { padding: 12px 14px 16px; border-radius: 22px; }
  .showcase__info .showcase__cta { position: static; display: inline-flex; margin-top: 14px; }
  .showcase__title { padding-right: 0; white-space: normal; line-height: 1.2; font-size: 21px; }
}

.showcase__arrow, .adapt .chip, .btn--ghost { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255, 255, 255, 0.82); }

/* A switched-on option stays dark with white text (the rule above would
   otherwise paint it white and hide its label) */
.adapt .chip[aria-pressed="true"],
.adapt .chip[aria-pressed="true"]:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ─── The principle: one statement with a section to itself. It is large and
   lights up word by word as it rises into view. ─────────────────────────── */
/* more room above than below, so the statement reads as the opening of About */
.statement { padding: clamp(88px, 14vh, 160px) 0 clamp(56px, 8vh, 96px); }
.about__title,
.about__title.rise { max-width: none; margin: 0; font-size: clamp(44px, 6.2vw, 100px); line-height: 1.04; font-weight: 600; letter-spacing: -0.035em; opacity: 1; transform: none; }
.about__title .word { transition: opacity 0.5s ease; }
/* the two words the statement turns on wear the brand indigo */
.about__title .word--accent { color: var(--violet); }
.about__title.is-scrub .word { opacity: 0.14; }
.about__title.is-scrub .word.is-lit { opacity: 1; }
:root[data-motion="calm"] .about__title .word,
:root[data-contrast="more"] .about__title .word { opacity: 1 !important; }
@media (prefers-reduced-motion: reduce) { .about__title .word { opacity: 1 !important; } }

/* ─── About: the person on the left, the words on the right ─────────────── */
.about { padding-top: 0; }
/* the words on the left, the portrait on the right */
/* One block with shared edges: the heading rule runs the full width, the text
   and the portrait start on the same line and end on the same line, and the
   skills close the block underneath. */
/* the portrait stands beside both the text and the skills, so it is taller than wide */
.about__grid { grid-template-columns: minmax(0, 1fr) clamp(230px, 22vw, 300px); column-gap: clamp(32px, 5vw, 72px); row-gap: 0; align-items: stretch; }
.about__grid > .about__photo-wrap { grid-column: 2; grid-row: 1 / span 2; }
.about__grid > .about__text { grid-column: 1; grid-row: 1; }
.about__grid > .skills { grid-column: 1; grid-row: 2; align-self: end; }
.about__text { max-width: none; font-size: clamp(17px, 1.3vw, 19px); }
.about .skills { margin-top: clamp(28px, 4vh, 44px); }
/* slightly tighter pills so the seven skills sit on one line beside the portrait */
.about .skills { gap: 7px; }
.about .skills li { padding: 7px 10px; }
/* The portrait card is the same sheet of glass as the project card: same tint,
   edge, radius and shadow. It leans a little toward the pointer. */
.about__grid > .about__photo-wrap { perspective: 1200px; }
.about__photo {
  position: relative; margin: 0; overflow: hidden;
  height: 100%; min-height: 260px; border-radius: 28px;
  background:
    radial-gradient(70% 45% at 50% 30%, rgba(255, 255, 255, 0.85), transparent 70%),
    radial-gradient(90% 60% at 50% 110%, rgba(120, 150, 220, 0.14), transparent 70%),
    rgba(232, 238, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 0 0 1px rgba(17, 17, 20, 0.05),
    0 40px 70px -40px rgba(30, 30, 120, 0.45);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
.about__photo.is-tilting { transition-duration: 0.15s; transition-timing-function: linear; }
/* the portrait shifts a touch against the card, so the tilt has depth */
.about__photo img { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transform: translate3d(var(--px, 0px), var(--py, 0px), 0); transform-origin: 50% 100%; transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.about__photo.is-tilting img { transition-duration: 0.15s; transition-timing-function: linear; }
:root[data-motion="calm"] .about__photo, :root[data-motion="calm"] .about__photo img { transform: none; }
@media (prefers-reduced-motion: reduce) { .about__photo, .about__photo img { transform: none; } }
.about .section-head { align-items: center; padding-bottom: 16px; margin-bottom: 28px; }
.about .section-head__title { font-size: 20px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
:root[data-contrast="more"] .about__photo { background: var(--cloud); border: 1px solid var(--ink); }
@media (max-width: 960px) {
  .about__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .about__grid > .about__photo-wrap, .about__grid > .about__text, .about__grid > .skills { grid-column: 1; grid-row: auto; }
  .about__grid > .about__photo-wrap { order: -1; max-width: 220px; height: 275px; }

}

/* the button's coloured glow is gone; a plain soft shadow is easier on the eye */
.showcase__cta { box-shadow: 0 8px 18px -10px rgba(20, 20, 60, 0.45); }

/* More contrast keeps the 3D devices: they are the project's picture in every
   mode. Only the soft floor shadow is dropped. */
:root[data-contrast="more"] .fusion-scene::before { display: none; }
