/* =====================================================================
   custom.css — Joel's own design tweaks on top of the Wix export.
   Edit freely; loaded last on every page (after Wix CSS + static-overrides.css).
   ===================================================================== */

:root { --jcd-ease: cubic-bezier(.22, .61, .36, 1); }

/* ---------- 1. Navigation hover states (desktop) ---------- */
/* Top level: Works / About / Contact - no underline (Joel 2026-11-23); hover dims the other items */
.itemDepth02233374943__label::after { content: none !important; display: none !important; }
/* Hovered top item turns blue (Joel 2026-11-24); others stay pure white, no dimming */
li[data-item-depth="0"] > div > a, li[data-item-depth="0"] > div > a * { transition: color .4s cubic-bezier(.22,.61,.36,1) !important; }
li[data-item-depth="0"]:hover > div > a, li[data-item-depth="0"]:hover > div > a *,
li[data-item-depth="0"][data-hovered] > div > a, li[data-item-depth="0"][data-hovered] > div > a * { color: #4a90ff !important; }

/* Works dropdown items: no background box (Joel 2026-11-23). Items sit slightly dimmed and go to full
   white on hover with a gentle 0.4s ease; the others dim further. Current page stays full white. */
.itemDepth12472627565__root,
.itemDepth12472627565__root:hover,
.itemDepth12472627565__root:focus-visible { background: transparent !important; background-color: transparent !important; box-shadow: none !important; }
.itemDepth12472627565__root .itemDepth12472627565__label { opacity: .8; transition: color .4s ease, opacity .4s ease; }
ul:hover > li[data-item-depth="1"]:not(:hover) .itemDepth12472627565__label { opacity: .55; }
.itemDepth12472627565__root:hover .itemDepth12472627565__label,
.itemDepth12472627565__root:focus-visible .itemDepth12472627565__label { color: #fff !important; opacity: 1; }
li[data-item-depth="1"][aria-current="page"] .itemDepth12472627565__label { color: #fff !important; opacity: 1; }

/* ---------- 2. Design Approach cards (home): hover glow ---------- */
/* Cards are tagged .jcd-glow-card by custom.js. --gx/--gy follow the cursor. */
.jcd-glow-card {
  position: relative; isolation: isolate; border-radius: 2px;
  transition: box-shadow .6s var(--jcd-ease), transform .6s var(--jcd-ease);
}
.jcd-glow-card::before {               /* inner radial light */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 40%),
              rgba(120, 160, 255, .16), rgba(120, 160, 255, .05) 40%, transparent 70%);
  opacity: 0; transition: opacity .6s var(--jcd-ease);
}
.jcd-glow-card::after {                /* glowing outline */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(170, 195, 255, .55);
  opacity: 0; transition: opacity .6s var(--jcd-ease);
}
.jcd-glow-card:hover, .jcd-glow-card.is-glow {
  box-shadow: 0 0 28px rgba(90, 130, 255, .22), 0 0 2px rgba(170, 195, 255, .5);
}
.jcd-glow-card:hover::before, .jcd-glow-card.is-glow::before,
.jcd-glow-card:hover::after,  .jcd-glow-card.is-glow::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .jcd-glow-card, .jcd-glow-card::before, .jcd-glow-card::after { transition: none; } }

/* ---------- 3. Header: hide on scroll down, show on scroll up (custom.js toggles .jcd-hidden) ---------- */
#SITE_HEADER.jcd-autohide { transition: transform .3s ease, opacity .3s ease; will-change: transform; }
#SITE_HEADER.jcd-autohide.jcd-hidden { transform: translateY(calc(-100% - 40px)); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { #SITE_HEADER.jcd-autohide { transition: none; } }

/* ---------- 4. Cross-Category grid (home): dim blue glow behind each product tile on hover ---------- */
/* custom.js lays 9 .jcd-tile hotspots over each grid image (each exactly over one tile's picture).
   .jcd-tile-halo is clipped to the tile + its gutter (--jcd-g), so the glow only lights the dark gutter
   around the hovered tile and never paints over neighbouring products. The crop (.jcd-tile-img) sits on top. */
.jcd-tilegrid { overflow: visible !important; }
.jcd-tiles { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.jcd-tile { position: absolute; pointer-events: auto; z-index: 1; }
.jcd-tile:hover, .jcd-tile.is-glow { z-index: 5; }
.jcd-tile-halo { position: absolute; inset: calc(var(--jcd-g, 4px) * -1); overflow: hidden; pointer-events: none; z-index: 0;
  opacity: 0; transition: opacity .6s var(--jcd-ease); }
.jcd-tile-halo::before { content: ""; position: absolute; inset: var(--jcd-g, 4px);
  box-shadow: 0 0 calc(var(--jcd-g, 4px) * 1.6) calc(var(--jcd-g, 4px) * .5) rgba(60, 140, 255, .75),
              0 0 calc(var(--jcd-g, 4px) * .6) 0 rgba(90, 160, 255, .6); }
.jcd-tile-img { position: absolute; inset: 0; z-index: 1; background-repeat: no-repeat;
  opacity: 0; transform: none; transition: opacity .25s var(--jcd-ease) .45s, transform .6s var(--jcd-ease); }
.jcd-tile:hover .jcd-tile-halo, .jcd-tile.is-glow .jcd-tile-halo { opacity: 1; }
.jcd-tile:hover .jcd-tile-img, .jcd-tile.is-glow .jcd-tile-img {
  opacity: 1; transform: scale(1.012); transition: opacity .2s var(--jcd-ease) 0s, transform .6s var(--jcd-ease); }

/* ---------- 5. Softer gallery hover overlays (site.js adds .jcd-ov / .jcd-ov-in) ---------- */
/* Darkening fades in/out gradually; title then description fade in with a small rise (stagger). No idle motion. */
.item-hover-flex-container.jcd-ov .gallery-item-hover,
.item-hover-flex-container.jcd-ov .gallery-item-hover::before { transition: opacity .65s var(--jcd-ease) !important; opacity: 0 !important; }
.item-hover-flex-container.jcd-ov.jcd-ov-in .gallery-item-hover,
.item-hover-flex-container.jcd-ov.jcd-ov-in .gallery-item-hover::before { opacity: 1 !important; }
/* (Wix forces .info-member{opacity:1 !important}, so the fade/rise is on the inner <span>.) */
.item-hover-flex-container.jcd-ov .info-element-title > span,
.item-hover-flex-container.jcd-ov .info-element-description > span {
  display: block; opacity: 0; transform: translateY(10px);
  transition: opacity .6s var(--jcd-ease), transform .6s var(--jcd-ease); }
.item-hover-flex-container.jcd-ov.jcd-ov-in .info-element-title > span { opacity: 1; transform: none; transition-delay: .08s; }
.item-hover-flex-container.jcd-ov.jcd-ov-in .info-element-description > span { opacity: 1; transform: none; transition-delay: .18s; }
.gallery-item-container img, .gallery-item-container picture { transition: filter .65s var(--jcd-ease), transform .65s var(--jcd-ease); }

@media (prefers-reduced-motion: reduce) {
  .jcd-tile, .jcd-tile-halo, .jcd-tile-img, .item-hover-flex-container.jcd-ov * { transition: none !important; }
}

/* ---------- 6. Home "Works" grid: tiles link to their project pages (build.py turns the wrappers into <a>) ---------- */
a.item-link-wrapper[data-jcd-link] { display: block; color: inherit; text-decoration: none; cursor: pointer; }
a.item-link-wrapper[data-jcd-link] .gallery-item-container { cursor: pointer; }

/* ---------- 7. Home video (Vimeo) inside its glow frame: no black ring ---------- */
/* Wix gives the player a dark drop shadow and a black container; the video now fills its box edge to edge
   at exact 16:9 (Vimeo letterboxes anything else), and custom.js lines it up with the glow image's frame. */
#comp-moybizuw, #comp-moybizuw * { box-shadow: none !important; }
#comp-moybizuw { aspect-ratio: 16 / 9; height: auto !important; overflow: hidden; background: transparent !important; }
#comp-moybizuw > div, #comp-moybizuw [class*="playerContainer"] { position: absolute !important; inset: 0 !important;
  width: 100% !important; height: 100% !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
#comp-moybizuw iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; display: block;
  transform: scale(1.006); transform-origin: center; }   /* crops any sub-pixel hairline from the player */

/* ---------- 8. Lightbox (only galleries that enlarge on click on the live site; see custom.js) ---------- */
.jcd-lb { position: fixed; inset: 0; z-index: 100000; background: rgba(6, 7, 10, .94);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .4s var(--jcd-ease), visibility 0s linear .4s; }
.jcd-lb.is-open { opacity: 1; visibility: visible; transition: opacity .4s var(--jcd-ease), visibility 0s; }
.jcd-lb-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 64px 88px; box-sizing: border-box; }
.jcd-lb-img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; user-select: none; -webkit-user-drag: none;
  opacity: 0; transition: opacity .4s var(--jcd-ease); }
.jcd-lb-img.is-in { opacity: 1; }
.jcd-lb-btn { position: absolute; background: none; border: 0; color: rgba(255, 255, 255, .7); cursor: pointer; padding: 12px;
  font: 300 44px/1 sans-serif; transition: color .4s var(--jcd-ease), opacity .4s var(--jcd-ease); }
.jcd-lb-btn:hover, .jcd-lb-btn:focus-visible { color: #fff; outline: none; }
.jcd-lb-close { top: 14px; right: 18px; font-size: 26px; }
.jcd-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); font-size: 56px; }
.jcd-lb-next { right: 16px; top: 50%; transform: translateY(-50%); font-size: 56px; }
.jcd-lb-count { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .6);
  font: 13px/1 sans-serif; letter-spacing: .08em; }
.jcd-lb-single .jcd-lb-prev, .jcd-lb-single .jcd-lb-next, .jcd-lb-single .jcd-lb-count { display: none; }
html.jcd-lb-lock, html.jcd-lb-lock body { overflow: hidden !important; }
@media (max-width: 600px), (hover: none) and (max-width: 1024px) {
  .jcd-lb-stage { padding: 56px 0; }
  .jcd-lb-prev, .jcd-lb-next { font-size: 40px; padding: 8px; }
}
@media (prefers-reduced-motion: reduce) { .jcd-lb, .jcd-lb-img { transition: none; } }

/* ---------- 9. Cursor light: blue glow following the mouse, on the page BACKGROUND only (see custom.js) ---------- */
/* Painted on Wix's background fill layers (colorUnderlay), which are below all images, video and text.
   Only OPAQUE fills (+ the page background) get it - custom.js tags them .jcd-lit - so transparent layers stacked
   in the header/columns never add a second copy: the light is one continuous circle at the same viewport
   position (background-attachment: fixed) across header and sections. */
:root { --mx: -2000px; --my: -2000px; --hb: 0px; --jcd-light: 0; }
html.jcd-light-on .jcd-lit[data-testid="colorUnderlay"] {
  background-image: radial-gradient(200px circle at var(--mx) calc(var(--my) - var(--hb)),
      rgba(70, 150, 255, calc(.18 * var(--jcd-light))) 0%,
      rgba(70, 150, 255, calc(.07 * var(--jcd-light))) 50%,
      rgba(70, 150, 255, 0) 100%) !important;
  background-attachment: fixed !important; background-repeat: no-repeat !important;
  background-position: 0 var(--hb) !important; background-size: 100% calc(100% - var(--hb)) !important; }
html.jcd-light-on #SITE_HEADER [data-testid="colorUnderlay"] { background-image: none !important; }   /* header: no light */

/* ---------- 10. Home: "Joel Chang Design | industrial design" H1 kept for search engines only ---------- */
/* Visually hidden (sr-only), still the page's H1 in the DOM; the headline below moves up into its place. */
#comp-moymd9fm { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important;
  padding: 0 !important; border: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important; white-space: nowrap !important; left: 0 !important; top: 0 !important; }
/* keep breathing room above the headline now that the H1 line is hidden (desktop/iPad layout only) */
#comp-m276lfoi:has(#comp-moymd9fm) #comp-m276lmt2 { margin-top: 96px !important; }

/* Visually hidden H1 used only when a page has no suitable heading */
.seo-sr-only { position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; clip-path: inset(50%) !important;
  white-space: nowrap !important; border: 0 !important; }

/* ---------- Header logo + header AND footer LinkedIn / Behance icons turn the menu-hover blue (#4a90ff) on hover (Joel 2026-11-24) ----------
   They are white PNGs (the <img> itself carries the id), so a blue copy is drawn on the img's wrapper with the same
   PNG as a mask (exact colour) and cross-faded in over 0.2s. */
:has(> :is(#img_comp-m26ho7tp, #img_0_comp-m26hqy39, #img_0_comp-m2768o98, #img_0_comp-m277hrti, #img_0_comp-m277hrto)) { position: relative; }
:is(#img_comp-m26ho7tp, #img_0_comp-m26hqy39, #img_0_comp-m2768o98, #img_0_comp-m277hrti, #img_0_comp-m277hrto) { transition: opacity .2s ease; }
:has(> :is(#img_comp-m26ho7tp, #img_0_comp-m26hqy39, #img_0_comp-m2768o98, #img_0_comp-m277hrti, #img_0_comp-m277hrto))::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; background: #4a90ff; opacity: 0; transition: opacity .2s ease;
  -webkit-mask-position: center; mask-position: center; -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
:has(> #img_comp-m26ho7tp)::after { -webkit-mask-image: url("../media/1e9c09_96f6bcd5dbc9424296b269813bc29e19_mv2_504x84_1723430a.png"); mask-image: url("../media/1e9c09_96f6bcd5dbc9424296b269813bc29e19_mv2_504x84_1723430a.png"); }
:has(> :is(#img_0_comp-m26hqy39, #img_0_comp-m277hrti))::after { -webkit-mask-image: url("../media/11062b_b5690303a8ff470e9b1c03a24aff140b_mv2_54x54_875efeea.png"); mask-image: url("../media/11062b_b5690303a8ff470e9b1c03a24aff140b_mv2_54x54_875efeea.png"); }
:has(> :is(#img_0_comp-m2768o98, #img_0_comp-m277hrto))::after { -webkit-mask-image: url("../media/1e9c09_03ad3edaacf84112ad4eba9cf5ad4caf_mv2_60x60_4c7bbc3e.png"); mask-image: url("../media/1e9c09_03ad3edaacf84112ad4eba9cf5ad4caf_mv2_60x60_4c7bbc3e.png"); }
:is(a:hover, a:focus-visible):has(> :is(#img_comp-m26ho7tp, #img_0_comp-m26hqy39, #img_0_comp-m2768o98, #img_0_comp-m277hrti, #img_0_comp-m277hrto))::after,
:is(a:hover, a:focus-visible) :has(> :is(#img_comp-m26ho7tp, #img_0_comp-m26hqy39, #img_0_comp-m2768o98, #img_0_comp-m277hrti, #img_0_comp-m277hrto))::after { opacity: 1; }
:is(a:hover, a:focus-visible) :is(#img_comp-m26ho7tp, #img_0_comp-m26hqy39, #img_0_comp-m2768o98, #img_0_comp-m277hrti, #img_0_comp-m277hrto) { opacity: 0 !important; }

/* ---------- Contact form: status + "sent" confirmation (custom.js) ---------- */
#comp-jqc9copb .jcd-honey { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
#comp-jqc9copb .jcd-bad { box-shadow: inset 0 -2px 0 #ff6b6b !important; }
#comp-jqc9copb .jcd-form-note { position: absolute; left: 0; right: 0; top: 100%; margin-top: 14px; min-height: 1em;
  font: 14px/1.5 "Poppins", "Helvetica Neue", Arial, sans-serif; letter-spacing: .02em; color: #ff8a8a; text-align: center; }
#comp-jqc9copb button.jcd-sending { opacity: .55; cursor: progress !important; }
#comp-jqc9copb .jcd-form-done { position: absolute; inset: -8px; z-index: 20; display: flex; align-items: center; justify-content: center;
  background: rgba(8, 10, 14, .94); border: 1px solid rgba(255, 255, 255, .22); opacity: 0; visibility: hidden;
  transition: opacity .35s ease, visibility 0s linear .35s; text-align: center; }
#comp-jqc9copb.jcd-sent .jcd-form-done { opacity: 1; visibility: visible; transition: opacity .35s ease; }
#comp-jqc9copb .jcd-form-done-in { padding: 24px; font-family: "Poppins", "Helvetica Neue", Arial, sans-serif; color: #fff; }
#comp-jqc9copb .jcd-form-done-t { font-size: 22px; font-weight: 500; letter-spacing: .02em; }
#comp-jqc9copb .jcd-form-done-t::before { content: "\2713"; display: block; margin: 0 auto 14px; width: 44px; height: 44px; line-height: 42px;
  border: 1.5px solid #4a90ff; border-radius: 50%; color: #4a90ff; font-size: 22px; }
#comp-jqc9copb .jcd-form-done-s { margin-top: 8px; font-size: 14px; color: rgba(255, 255, 255, .7); }
#comp-jqc9copb .jcd-form-again { margin-top: 22px; padding: 10px 22px; background: transparent; color: #fff; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .5); font: 13px/1 "Poppins", Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase;
  transition: color .2s ease, border-color .2s ease; }
#comp-jqc9copb .jcd-form-again:hover, #comp-jqc9copb .jcd-form-again:focus-visible { color: #4a90ff; border-color: #4a90ff; outline: none; }

/* ===== Mobile fixes (pt120u) ===== */
/* 1 + 4: page canvas black, so nothing white shows below the footer or through sub-pixel seams between sections */
html:has(> body.device-mobile-optimized), body.device-mobile-optimized { background-color: #000 !important; }
.device-mobile-optimized #SITE_CONTAINER, .device-mobile-optimized #site-root, .device-mobile-optimized #masterPage { background-color: #000; }
.device-mobile-optimized #SITE_FOOTER :is(.CmHRsG, .EaoiSu) { background-color: #000 !important; }
.device-mobile-optimized [id^="bgLayers_pageBackground_"] .LNYVZi { background-color: #000 !important; }
/* 2: white frames / lines at half thickness */
.device-mobile-optimized .BprtEa { border-width: 1px !important; }
.device-mobile-optimized .v9ZE1l { border-width: 1.5px !important; }
.device-mobile-optimized .wixui-horizontal-line { border-top-width: 1px !important; }
.device-mobile-optimized .wixui-vector-image svg path { stroke-width: 1px !important; }
/* 3: m/about Education + Languages laid out like Work Experience / Awards (year column + item column, same type sizes) */
.device-mobile-optimized div:has(> #comp-mujj9yx713) { grid-template-rows: repeat(4, auto) !important; grid-template-columns: 280px !important; }
.device-mobile-optimized :is(#comp-mujj9yx713, #comp-mujn0kvf12) { grid-area: auto / 1 / auto / 2 !important; margin: 0 0 10px !important; }
.device-mobile-optimized #comp-mujj9yx713 { grid-row: 1 !important; margin-left: -3px !important; }
.device-mobile-optimized #comp-mujn0kvf12 { grid-row: 3 !important; margin: 6px 0 10px -3px !important; }
.device-mobile-optimized :is(#comp-mujj9yx713, #comp-mujn0kvf12) :is(h1,h2,h3,h4,h5,h6,p,span) { font-size: 11px !important; }
.device-mobile-optimized :is(#comp-mujj9yx82, #comp-mujj9yx9) { grid-area: 2 / 1 / 3 / 2 !important; margin: 0 !important; }
.device-mobile-optimized :is(#comp-mujn0kvg6, #comp-mujn0kvh5) { grid-area: 4 / 1 / 5 / 2 !important; margin: 0 !important; }
.device-mobile-optimized :is(#comp-mujj9yx82, #comp-mujn0kvg6) { width: 86px !important; }
.device-mobile-optimized :is(#comp-mujj9yx9, #comp-mujn0kvh5) { width: 204px !important; margin-left: 73px !important; }
.device-mobile-optimized :is(#comp-mujj9yx82, #comp-mujj9yx9, #comp-mujn0kvg6, #comp-mujn0kvh5) :is(h1,h2,h3,h4,h5,h6,p,span) { font-size: 6px !important; line-height: normal !important; }
/* 5: hamburger pressed state; logo blue copy uses the mobile logo file so its aspect matches */
#MENU_AS_CONTAINER_TOGGLE, #SITE_HEADER a { -webkit-tap-highlight-color: transparent; }
#MENU_AS_CONTAINER_TOGGLE { transition: transform .12s ease; outline: none; }
#MENU_AS_CONTAINER_TOGGLE .jECeES { transition: background-color .12s ease; }
#MENU_AS_CONTAINER_TOGGLE:active { transform: scale(.9); }
#MENU_AS_CONTAINER_TOGGLE:active .jECeES { background-color: #4a90ff !important; }
.device-mobile-optimized :has(> #img_comp-m26ho7tp)::after { -webkit-mask-image: url("../media/1e9c09_96f6bcd5dbc9424296b269813bc29e19_mv2_300x38_3fb1d16b.png"); mask-image: url("../media/1e9c09_96f6bcd5dbc9424296b269813bc29e19_mv2_300x38_3fb1d16b.png"); }
a:active:has(> #img_comp-m26ho7tp)::after, a:active :has(> #img_comp-m26ho7tp)::after { opacity: 1; }
a:active #img_comp-m26ho7tp { opacity: 0 !important; }
/* 6: Works category buttons: no focus ring / tap flash; pressed = light-grey fill, white text, thin grey border */
a.StylableButton2545352419__root { -webkit-tap-highlight-color: transparent; }
a.StylableButton2545352419__root:focus { outline: none !important; box-shadow: none !important; }
a.StylableButton2545352419__root:is(:active, :focus-visible) { background-color: #8a8a8a !important; border-color: rgb(62, 62, 62) !important; outline: none !important; box-shadow: none !important; }
a.StylableButton2545352419__root:is(:active, :focus-visible) .StylableButton2545352419__label { color: #fff !important; }
