/* Work page (all projects as disclosures) and Projects page (Carta PMGC, Rotation) in the showreel look. */
.work-page-intro, .projects-intro { padding: 64px 0 36px; }
.work-page-intro .text-link, .projects-intro .text-link { margin-bottom: 26px; }
.work-page-intro h1, .projects-intro h1 { margin: 0; font: 800 clamp(3rem, 7vw, 6.4rem)/.88 var(--display); text-transform: uppercase; letter-spacing: -.01em; }
.work-page-intro > p, .projects-intro > p { max-width: 620px; margin: 20px 0 0; font-size: 1.0625rem; line-height: 1.75; color: var(--muted); }
.work-directory { padding-bottom: 70px; }
.work-case { border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 16px); }
.work-case:last-of-type { border-bottom: 1px solid var(--line); }
.work-case > summary { display: grid; grid-template-columns: 44px minmax(0, 1fr) 36px; gap: 18px; align-items: center; padding: 24px 0; cursor: pointer; list-style: none; }
.work-case > summary::-webkit-details-marker { display: none; }
.work-case > summary:hover .case-title { color: var(--accent-text); }
.case-number { align-self: start; padding-top: 6px; font: 700 .75rem/1 var(--mono); letter-spacing: .1em; color: var(--accent-text); }
.case-title { font: 800 clamp(1.5rem, 3vw, 2.3rem)/1.05 var(--display); text-transform: uppercase; transition: color .2s; }
.case-category { display: block; margin-top: 6px; font: 700 .6875rem/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.case-toggle { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 1.25rem; line-height: 1; }
.case-toggle::before { content: '+'; }
.work-case[open] .case-toggle { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.work-case[open] .case-toggle::before { content: '−'; }
.case-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 44px; padding: 4px 62px 40px; }
.case-detail h2 { margin: 0 0 10px; font: 700 .72rem/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.case-detail p, .case-detail li { color: var(--muted); font-size: 1rem; line-height: 1.8; }
.case-detail p { margin: 0 0 24px; }
.case-detail ul { margin: 0 0 24px; padding-left: 20px; }
.work-cover { overflow: hidden; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 14px; background: var(--media-surface); }
.work-cover img { width: 100%; height: 100%; object-fit: contain; }
.case-detail .work-cover { max-width: 520px; margin-bottom: 24px; }
.case-metric { margin: 0 0 24px; padding: 18px 20px; border-left: 4px solid var(--accent); border-radius: 4px 14px 14px 4px; background: var(--bg-2); }
.case-metric strong { display: block; font: 800 clamp(2.2rem, 3.6vw, 3rem)/.95 var(--display); color: var(--accent-text); }
.case-metric > span { display: block; margin-top: 8px; font-weight: 700; font-size: .9375rem; }
.case-metric p { margin: 10px 0 0; font-size: .8125rem; line-height: 1.65; }
.case-links { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.case-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: .9375rem; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.case-links a:hover { color: var(--accent-text); }
.work-context { max-width: 860px; margin-top: 30px; font-size: .8125rem; line-height: 1.8; color: var(--muted); }
.profile-download { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 26px; }
.profile-download small { font: 600 .75rem/1.6 var(--mono); letter-spacing: .08em; color: var(--muted); }
.work-page .footer-word, .projects-page .footer-word { display: none; }

/* Projects page */
.projects { display: grid; gap: 22px; padding-bottom: 70px; }
.project { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--bg-2); }
.project-info { display: flex; flex-direction: column; padding: 30px; }
.project-topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.project-index { font: 700 .72rem/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.tag { padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font: 700 .6875rem/1.4 var(--mono); letter-spacing: .1em; }
.project h3 { margin: 22px 0 12px; font: 800 clamp(2.6rem, 5vw, 4.2rem)/.9 var(--display); text-transform: uppercase; }
.project-dot { color: var(--accent); }
.project-info > p { max-width: 640px; margin: 0; font-size: 1rem; line-height: 1.8; color: var(--muted); }
.features { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.features span { padding: 6px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: .8125rem; font-weight: 700; }
.data-note { margin-top: 14px !important; font-size: .8125rem !important; }
.project-link { align-self: flex-start; display: inline-flex; align-items: center; min-height: 52px; margin-top: 22px; padding: 0 22px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 800; transition: background-color .2s, transform .2s; }
.project-link:hover { background: var(--accent-hover); transform: translateY(-2px); }
.tool-preview { border-top: 1px solid var(--line); }
.tool-preview > summary { display: flex; align-items: center; min-height: 52px; padding: 0 30px; font-weight: 700; font-size: .9375rem; cursor: pointer; }
.tool-preview:not([open]) .project-art { display: none; }
.project-art { position: relative; min-height: 360px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 24px 28px; }
.art-top { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; font: 700 .6875rem/1.4 var(--mono); letter-spacing: .1em; }
.art-caption { position: relative; margin-top: auto; font: 700 .6875rem/1.4 var(--mono); letter-spacing: .1em; }
.carta-art { background: #FF5A1F; color: #160902; }
.carta-type { position: absolute; z-index: 2; left: 30px; top: 92px; display: flex; flex-direction: column; font: 800 clamp(4.4rem, 8vw, 7.4rem)/.82 var(--display); letter-spacing: -.02em; transform: rotate(-8deg); }
.carta-type br { display: none; }
.carta-bars { position: absolute; left: 30%; right: -6%; top: 70px; bottom: 18px; display: flex; align-items: flex-end; gap: 10px; transform: rotate(-12deg); }
.carta-bars > span { flex: 1; height: 26%; background: rgba(22, 9, 2, .28); transition: height .8s ease; }
.carta-bars > span:nth-child(2) { height: 44%; background: rgba(22, 9, 2, .38); }
.carta-bars > span:nth-child(3) { height: 70%; background: rgba(22, 9, 2, .5); }
.carta-bars > span:nth-child(4) { height: 91%; background: #FFC23D; }
.carta-bars > span:nth-child(5) { height: 52%; background: rgba(22, 9, 2, .3); }
.carta-art[data-scene="1"] .carta-bars span:nth-child(1) { height: 73%; } .carta-art[data-scene="1"] .carta-bars span:nth-child(2) { height: 89%; } .carta-art[data-scene="1"] .carta-bars span:nth-child(3) { height: 53%; } .carta-art[data-scene="1"] .carta-bars span:nth-child(4) { height: 35%; } .carta-art[data-scene="1"] .carta-bars span:nth-child(5) { height: 68%; }
.carta-art[data-scene="2"] .carta-bars span:nth-child(1) { height: 91%; } .carta-art[data-scene="2"] .carta-bars span:nth-child(2) { height: 52%; } .carta-art[data-scene="2"] .carta-bars span:nth-child(3) { height: 39%; } .carta-art[data-scene="2"] .carta-bars span:nth-child(4) { height: 63%; } .carta-art[data-scene="2"] .carta-bars span:nth-child(5) { height: 82%; }
.rotation-art { background: #0E1A1F; color: #E8FBFF; }
.rotation-diagram { position: absolute; inset: 60px 0 46px; display: flex; align-items: center; justify-content: center; }
.rotation-diagram svg { width: 100%; height: 100%; }
.rotation-grid { opacity: .18; }
.zone { fill: none; stroke: #33E6FF; stroke-width: 1; }
.zone-inner { stroke-width: 1.5; }
.zone-core { fill: rgba(51, 230, 255, .28); stroke: none; }
.team-route { fill: none; stroke: #FF5A1F; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 5 7; }
.team-point { fill: #FF5A1F; stroke: #fff; stroke-width: 3; }
.zone-inner, .zone-core, .team-point { transition: transform .7s ease; }
.rotation-art[data-scene="1"] .zone-inner { transform: translate(-24px, 22px); } .rotation-art[data-scene="1"] .zone-core { transform: translate(-40px, 30px); } .rotation-art[data-scene="1"] .team-point { transform: translate(32px, -12px); }
.rotation-art[data-scene="2"] .zone-inner { transform: translate(13px, 9px); } .rotation-art[data-scene="2"] .zone-core { transform: translate(17px, 8px); } .rotation-art[data-scene="2"] .team-point { transform: translate(72px, -33px); }
.rotation-word { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font: 800 clamp(3rem, 6vw, 5rem)/.86 var(--display); transform: rotate(-8deg); pointer-events: none; }
.rotation-word br { display: none; }
.preview-button { position: absolute; z-index: 3; right: 24px; bottom: 50px; max-width: calc(100% - 48px); min-height: 44px; padding: 8px 14px; border: 2px solid currentColor; border-radius: 999px; background: transparent; color: inherit; font-weight: 800; font-size: .8125rem; line-height: 1.4; }
.preview-button:hover { background: rgba(255, 255, 255, .2); }

html:lang(my) .work-page-intro h1, html:lang(my) .projects-intro h1, html:lang(th) .work-page-intro h1, html:lang(th) .projects-intro h1,
html:lang(my) .case-title, html:lang(th) .case-title, html:lang(my) .carta-type, html:lang(th) .carta-type, html:lang(my) .rotation-word, html:lang(th) .rotation-word { font-family: var(--body); text-transform: none; letter-spacing: 0; }
html:lang(my) .work-page-intro h1, html:lang(my) .projects-intro h1 { font-size: clamp(1.6rem, 3.2vw, 2.8rem); line-height: 1.6; }
html:lang(th) .work-page-intro h1, html:lang(th) .projects-intro h1 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.3; }
html:lang(my) .case-title, html:lang(th) .case-title { font-size: clamp(1.05rem, 2vw, 1.4rem); line-height: 1.6; }
html:lang(my) .carta-type, html:lang(th) .carta-type, html:lang(my) .rotation-word, html:lang(th) .rotation-word { font-size: clamp(1.5rem, 3vw, 2.6rem); line-height: 1.5; }

@media (min-width: 900px) {
  .project { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tool-preview { border-top: 0; border-left: 1px solid var(--line); }
  .tool-preview > summary { display: none; }
  .project-art { min-height: 420px; }
}
@media (max-width: 760px) {
  .work-page-intro, .projects-intro { padding: 40px 0 26px; }
  .work-case > summary { grid-template-columns: 26px minmax(0, 1fr) 32px; gap: 12px; padding: 20px 0; }
  .case-toggle { width: 32px; height: 32px; }
  .case-detail { grid-template-columns: 1fr; gap: 0; padding: 0 0 28px; }
  .project-info { padding: 24px 20px; }
  .tool-preview > summary { padding: 0 20px; }
  .project-art { min-height: 320px; padding: 20px; }
  .carta-type { left: 22px; top: 86px; }
}
@media (prefers-reduced-motion: reduce) { .carta-bars > span, .zone-inner, .zone-core, .team-point { transition: none; } }
