/* =============================================================
   Work: project page
   Each project is a drawing sheet: a framed panel with a title block
   (number, type, client, status), a technical figure and the facts.
   ============================================================= */
.wk-page { --wk-g: #5dd2a6; --wk-a: #e9a566; --wk-b: #8ec5ff; --wk-r: #e0705a; --wk-sheet: #0f1720; }
.wk-h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(30px, 3.8vw, 54px); line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; max-width: 15em; }
.wk-h2 em { font-style: normal; color: var(--copper-hi); }

/* ---------- Hero with the project register ---------- */
.wk-hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(40px, 5vw, 64px) 0 clamp(56px, 7vw, 96px);
  background: radial-gradient(60% 70% at 90% 20%, rgba(201,123,61,0.10), transparent 60%), var(--ink); border-bottom: 1px solid var(--line); }
.wk-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(142,197,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(142,197,255,0.035) 1px, transparent 1px),
                    linear-gradient(rgba(142,197,255,0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(142,197,255,0.02) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  -webkit-mask-image: radial-gradient(90% 80% at 60% 40%, #000 30%, transparent 85%); mask-image: radial-gradient(90% 80% at 60% 40%, #000 30%, transparent 85%); }
.wk-hg { margin-top: clamp(30px, 4vw, 56px); display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.wk-hc h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(38px, 5vw, 72px); line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; }
.wk-hc h1 em { font-style: normal; color: var(--copper-hi); }
.wk-sub { margin-top: 22px; max-width: 28em; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: var(--text-mute); }
.wk-reg { border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; background: rgba(11,17,24,0.6); overflow: hidden; }
.wr-h, .wr-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 0 20px; }
.wr-h { height: 40px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); border-bottom: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.02); }
.wr-row { position: relative; min-height: 72px; text-decoration: none; color: var(--text); border-bottom: 1px solid rgba(255,255,255,0.07); transition: background .3s; }
.wr-row:last-child { border-bottom: 0; }
.wr-row::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 2px; background: var(--copper); transform: scaleY(0); transition: transform .35s var(--ease); }
.wr-row:hover, .wr-row:focus-visible { background: rgba(201,123,61,0.07); }
.wr-row:hover::before, .wr-row:focus-visible::before { transform: scaleY(1); }
.wr-row b { font-family: var(--font-mono); font-weight: 500; font-size: 13px; color: var(--copper-hi); }
.wr-row strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: 17px; line-height: 1.25; }
.wr-row small { display: block; margin-top: 3px; font-size: 13px; color: var(--text-dim); }
.wr-row em { font-style: normal; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); border: 1px solid rgba(255,255,255,0.14); border-radius: 30px; padding: 5px 10px; white-space: nowrap; }
.wr-row em.live { color: var(--wk-g); border-color: rgba(93,210,166,0.5); }
.wr-row em.live::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-inline-end: 7px; border-radius: 50%; background: var(--wk-g); vertical-align: 1px; animation: wkBlink 2s ease infinite; }
.wr-row em.pub { color: var(--wk-b); border-color: rgba(142,197,255,0.45); }

/* ---------- The sheet ---------- */
.wk-sheet { position: relative; scroll-margin-top: 90px; background: var(--wk-sheet); border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; padding: 10px; }
.wk-sheet::before { content: ''; position: absolute; inset: 10px; border: 1px solid rgba(142,197,255,0.08); border-radius: 10px; pointer-events: none; }
.ws-tb { position: relative; display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); border-bottom: 1px solid rgba(255,255,255,0.1); }
.ws-tb > span { display: flex; flex-direction: column; gap: 3px; padding: 10px 16px; min-width: 0; border-inline-start: 1px solid rgba(255,255,255,0.08); font-size: 13.5px; color: var(--text); }
.ws-tb > span:first-child { border-inline-start: 0; }
.ws-tb i { font-style: normal; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); }
.ws-tb .no { font-family: var(--font-mono); font-size: 18px; font-weight: 500; color: var(--copper-hi); line-height: 1.1; }
.ws-tb .live { color: var(--wk-g); }
.ws-tb .pub { color: var(--wk-b); }
.ws-in { position: relative; padding: clamp(20px, 2.4vw, 32px); }

/* featured: ET Fuels */
.wk-live { padding: clamp(64px, 8vw, 110px) 0 clamp(40px, 5vw, 70px); background: var(--ink); }
.wk-feature .ws-in { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(26px, 4vw, 60px); align-items: center; }
.wk-feature h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(28px, 3vw, 44px); line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; }
.wk-feature h2 em { font-style: normal; color: var(--copper-hi); }
.wk-feature .ws-p { margin-top: 16px; font-size: 16.5px; line-height: 1.6; color: var(--text-mute); max-width: 34em; }
.ws-spec { margin-top: 22px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 18px; font-size: 14.5px; }
.ws-spec dt { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); padding-top: 3px; }
.ws-spec dd { margin: 0; color: var(--text); }
.ws-scope { list-style: none; margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.ws-scope li { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(232,229,223,0.85); border: 1px solid rgba(255,255,255,0.12); border-radius: 30px; padding: 6px 12px; }
.ws-scope li b { font-family: var(--font-mono); font-weight: 500; font-size: 10.5px; color: var(--copper-hi); }
.ws-links { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.ws-ext { font-size: 14.5px; color: var(--text-mute); text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; }
.ws-ext:hover { color: var(--text); border-color: var(--copper); }
.ws-fig { position: relative; border-radius: 12px; background: #0a1017; border: 1px solid rgba(255,255,255,0.07); padding: 14px; }
.ws-fig svg { display: block; width: 100%; height: auto; }

/* delivered work */
.wk-done { padding: clamp(40px, 5vw, 70px) 0 clamp(80px, 10vw, 130px); background: var(--ink); }
.wk-c-head { text-align: center; margin-bottom: clamp(36px, 4.5vw, 56px); }
.wk-c-head .section-label { justify-content: center; }
.wk-c-head .wk-h2 { margin: 0 auto; }
.wk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.wk-grid .ws-in { display: flex; flex-direction: column; gap: 14px; height: calc(100% - 52px); }
.wk-grid h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(21px, 2vw, 27px); line-height: 1.15; letter-spacing: -0.02em; margin-top: 4px; }
.wk-grid h3 em { font-style: normal; color: var(--copper-hi); }
.wk-grid .ws-p { font-size: 15px; line-height: 1.6; color: var(--text-mute); }
.ws-leg { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); }
.ws-leg span { display: inline-flex; align-items: center; gap: 7px; }
.ws-leg i { display: inline-block; width: 16px; height: 2px; border-radius: 2px; background: currentColor; }
.ws-leg .g { color: var(--wk-g); } .ws-leg .a { color: var(--wk-a); } .ws-leg .b { color: var(--wk-b); } .ws-leg .r { color: var(--wk-r); } .ws-leg .p { color: #b7a6e6; }
.ws-leg i.d { background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px); }
.ws-leg i.o { width: 8px; height: 8px; border-radius: 50%; }
.ws-leg span:not(.g):not(.a):not(.b):not(.r):not(.p) { color: var(--text-dim); }
.ws-facts { margin-top: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 6px; }
.ws-facts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ws-facts div { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 10px; }
.ws-facts b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 1; letter-spacing: -0.02em; color: var(--text); }
.ws-facts span { display: block; margin-top: 6px; font-size: 12.5px; line-height: 1.35; color: var(--text-dim); }
.ws-go { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 14.5px; color: var(--copper-hi); text-decoration: none; border-bottom: 1px solid rgba(201,123,61,0.4); padding-bottom: 2px; }
.ws-go i { font-style: normal; transition: transform .3s var(--ease); }
.ws-go:hover { color: var(--text); border-color: var(--copper); }
.ws-go:hover i { transform: translateX(4px); }
html[dir="rtl"] .ws-go:hover i { transform: translateX(-4px); }
.ws-photo { border-radius: 10px; overflow: hidden; background: #0b1118; aspect-ratio: 400 / 200; position: relative; }
.ws-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; display: block; mix-blend-mode: lighten; opacity: 0.92;
  -webkit-mask-image: radial-gradient(85% 90% at 50% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(85% 90% at 50% 50%, #000 55%, transparent 100%); }

/* figure strokes */
.fx-ax { fill: none; stroke: rgba(232,229,223,0.28); stroke-width: 1; }
.fx-gl { fill: none; stroke: rgba(232,229,223,0.07); stroke-width: 1; }
.fx-g { fill: none; stroke: var(--wk-g); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fx-a { fill: none; stroke: var(--wk-a); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fx-b { fill: none; stroke: var(--wk-b); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fx-p { fill: none; stroke: #b7a6e6; stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 4 4; }
.fx-d { stroke-dasharray: 5 4; }
.fx-mesh { fill: none; stroke: rgba(93,210,166,0.5); stroke-width: 1.1; }
.fx-out { fill: none; stroke: rgba(232,229,223,0.16); stroke-width: 1; }
.fx-bound { fill: rgba(93,210,166,0.05); stroke: var(--wk-g); stroke-width: 1.2; stroke-dasharray: 5 4; }
.fx-n { fill: var(--wk-g); } .fx-no { fill: rgba(232,229,223,0.25); } .fx-poi { fill: var(--wk-a); }
.fx-crit { fill: var(--wk-r); } .fx-critr { fill: none; stroke: var(--wk-r); stroke-width: 1; opacity: 0.5; }
.fx-draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
.fx-draw.fx-d { stroke-dasharray: none; }
.reveal:not(.in) .fx-draw { stroke-dashoffset: 1; }
.reveal.in .fx-draw { animation: wkDraw 1.6s var(--ease) both; animation-delay: calc(0.35s + var(--d, 0s)); }

/* ---------- Close (paper) ---------- */
.wk-close .cta-c { background: transparent; padding: clamp(80px, 10vw, 130px) 0; }
.wk-ask { margin-top: 30px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.wk-ask span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tp-mute); border: 1px solid var(--tp-line); border-radius: 30px; padding: 8px 14px; }
.wk-ask span i { font-style: normal; color: var(--tp-acc); margin-inline-end: 7px; }
.wk-ask span.out { color: var(--tp-ok); border-color: var(--tp-ok); }
.wk-ask b { font-weight: 400; color: var(--tp-acc); }
html[dir="rtl"] .wk-ask b { display: inline-block; transform: scaleX(-1); }

@keyframes wkBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes wkDraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .wr-row em.live::before { animation: none; } .reveal.in .fx-draw { animation-duration: 0.01s; } }

/* ---------- Arabic ---------- */
html[dir="rtl"] :is(.wr-h, .wr-row em, .ws-tb i, .ws-spec dt, .ws-leg, .wk-ask span) { letter-spacing: 0; }
html[dir="rtl"] .ws-tb i, html[dir="rtl"] .wr-h, html[dir="rtl"] .ws-spec dt { font-size: 12px; }
html[dir="rtl"] .wk-hc h1 { line-height: 1.3; }
html[dir="rtl"] .wk-h2, html[dir="rtl"] .wk-feature h2 { line-height: 1.35; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .wk-hg, .wk-feature .ws-in { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .wk-grid { grid-template-columns: minmax(0, 1fr); }
  .wk-grid .ws-in { height: auto; }
}
@media (max-width: 600px) {
  .ws-tb { grid-template-columns: auto minmax(0, 1fr); }
  .ws-tb > span:nth-child(3) { border-inline-start: 0; }
  .ws-tb > span:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,0.08); }
  .wr-h, .wr-row { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 0 14px; gap: 10px; }
  .wr-row strong { font-size: 15.5px; }
  .wr-row small { font-size: 12px; }
  .wr-row em { font-size: 9.5px; padding: 4px 8px; }
  .ws-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ws-facts b { font-size: 18px; }
  .ws-spec { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ws-spec dd { margin-bottom: 8px; }
}
.fx-t { font-family: var(--font-mono); font-size: 10px; fill: rgba(232,229,223,0.5); }
