/* WevDev — work page styles. Loaded after css/main.css. */

/* Header */
/* matches .page-header / .page-header h1 in styles.css, which the other
   pages use — this header was running at 200px against their 140px */
.work-header { padding: 180px 0 48px; }
.work-header .big {
  font-family: "Jost", var(--sans);
  font-weight: 600;
  font-size: clamp(42px, 7vw, 100px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin-top: 16px;
}
.work-header .big em { font-style: normal; font-family: inherit; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.work-header .meta {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: 48px; padding-top: 28px;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px;
  color: var(--fg-dim); letter-spacing: 0.06em; text-transform: uppercase;
  flex-wrap: wrap; gap: 16px;
}
.work-header .count { color: var(--accent); }

/* Sticky filter */
.filter-shell { position: sticky; top: 76px; z-index: 20; padding: 16px 0; background: color-mix(in oklch, var(--bg) 85%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.wchip {
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.11em; text-transform: uppercase;
  cursor: pointer; user-select: none;
  color: var(--fg-dim);
  display: inline-flex; align-items: center; gap: 8px;
  transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.wchip:hover { color: var(--fg); border-color: var(--line-strong); }
.wchip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.4; }
.wchip.on { color: #17100a; background: var(--grad); border-color: transparent; font-weight: 500; }
.wchip.on .dot { background: #17100a; opacity: .7; }
.view-toggle { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 100px; }
.view-toggle button { padding: 6px 14px; background: none; border: none; color: var(--fg-dim); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; border-radius: 100px; transition: all 0.2s var(--ease); }
.view-toggle button.on { background: var(--grad); color: #17100a; font-weight: 500; }

/* Index / list of projects */
.work-index { padding: 40px 0 80px; }
.case {
  display: grid;
  grid-template-columns: 60px 1.2fr 1fr;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
  transition: all 0.4s var(--ease);
  position: relative;
  cursor: pointer;
}
.case::before {
  content: ""; position: absolute; inset: 0;
  background: var(--bg-elev); opacity: 0;
  transition: opacity 0.4s var(--ease);
  z-index: 0; margin: 0 -24px; border-radius: 12px;
}
.case:hover::before { opacity: 1; }
.case > * { position: relative; z-index: 1; }
.case:hover { border-bottom-color: transparent; }
/* the 60px + 1.2fr + 1fr grid cannot fit a 350px column, so stack it */
@media (max-width: 720px) {
  .case { grid-template-columns: 1fr; gap: 14px; padding: 24px 0; }
  .case::before { margin: 0 -16px; }
  .case-meta { justify-content: flex-start; gap: 20px; flex-wrap: wrap; }
  .case-meta-group { text-align: left; }
  .case-arrow { width: 40px; height: 40px; }
}
.case-num { font-family: var(--mono); font-size: 12px; color: var(--fg-faint); letter-spacing: 0.08em; }
.case-title {
  font-family: "Jost", var(--sans);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.case-title em { font-style: normal; font-family: inherit; font-weight: 300; color: var(--fg-dim); transition: color 0.3s var(--ease); }
.case:hover .case-title em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.case-meta { display: flex; align-items: center; gap: 24px; justify-content: flex-end; }
.case-meta-group { display: flex; flex-direction: column; gap: 4px; text-align: right; }
.case-meta-label { font-family: var(--mono); font-size: 10px; color: var(--fg-faint); letter-spacing: 0.08em; text-transform: uppercase; }
.case-meta-value { font-family: var(--sans); font-size: 14px; color: var(--fg); }
.case-arrow {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg); transition: all 0.3s var(--ease);
  flex-shrink: 0;
}
.case:hover .case-arrow { background: var(--accent); border-color: var(--accent); color: #fff; transform: rotate(-45deg); }

/* Hover preview — follows cursor */
.hover-preview {
  position: fixed;
  top: 0; left: 0;
  width: 380px; height: 280px;
  border-radius: 12px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 100;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5);
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
}
.hover-preview.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.hover-preview .hp-stripes {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(-45deg, var(--bg-elev-2), var(--bg-elev-2) 14px, var(--bg-elev) 14px, var(--bg-elev) 28px);
}
.hover-preview .hp-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; color: var(--fg-faint);
  letter-spacing: 0.08em; text-transform: uppercase;
  text-align: center; padding: 0 24px;
}

@media (max-width: 820px) {
  .case { grid-template-columns: 32px 1fr; }
  .case-meta { display: none; }
  .hover-preview { display: none; }
}

/* Grid view alternative */
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 40px 0 80px; }
@media (max-width: 820px) { .work-grid { grid-template-columns: 1fr; } }
.wcard { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-elev); aspect-ratio: 4/3; transition: all 0.4s var(--ease); display: block; }
.wcard:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 24px 60px -20px rgba(255,94,26,.22); }
.wcard.feature { grid-column: span 2; aspect-ratio: 16/7; }
@media (max-width: 820px) { .wcard.feature { grid-column: auto; aspect-ratio: 4/3; } }
.wcard-stripes { position: absolute; inset: 0; background-image: repeating-linear-gradient(-45deg, var(--bg-elev-2), var(--bg-elev-2) 14px, var(--bg-elev) 14px, var(--bg-elev) 28px); transition: transform 0.6s var(--ease); }
.wcard:hover .wcard-stripes { transform: scale(1.05); }
.wcard-stripes::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.7) 100%); }
[data-theme="light"] .wcard-stripes::after { background: linear-gradient(180deg, transparent 40%, rgba(11,12,14,0.5) 100%); }
.wcard-body { position: absolute; inset: 0; padding: 32px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; }
.wcard-top { display: flex; justify-content: space-between; align-items: flex-start; }
.wcard-cat { font-family: var(--mono); font-size: 10px; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 12px; background: rgba(0,0,0,0.6); border-radius: 100px; backdrop-filter: blur(10px); }
.wcard-year { font-family: var(--mono); font-size: 10px; color: rgba(255,255,255,0.7); letter-spacing: 0.1em; }
.wcard-title { font-family: "Jost", var(--sans); font-weight: 600; font-size: clamp(24px, 3vw, 40px); line-height: 1; letter-spacing: -0.02em; }
.wcard-title em { font-style: normal; font-family: inherit; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wcard-stripes-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10px; color: var(--fg-faint); letter-spacing: 0.08em; text-transform: uppercase; }

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  overflow: hidden;
  margin: 60px 0;
}
@media (max-width: 720px) { .stats-strip { grid-template-columns: 1fr 1fr; } }
.stat {
  padding: 34px 30px 30px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background .4s var(--ease);
}
.stat:last-child { border-right: none; }
.stat:hover { background: var(--bg-elev-2); }
@media (max-width: 720px) {
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
.stat-num {
  font-family: "Jost", var(--sans);
  font-weight: 600;
  font-size: clamp(42px, 4.4vw, 60px);
  line-height: 1;
  letter-spacing: -0.04em;
}
.stat-num em { font-style: normal; font-family: inherit; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { font-family: var(--mono); font-size: 10.5px; color: var(--fg-dim); letter-spacing: 0.1em; text-transform: uppercase; }

/* Empty state */
.empty-state { padding: 80px 20px; text-align: center; color: var(--fg-faint); font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; display: none; }
.empty-state.show { display: block; }
[data-theme="light"] .wcard-cat { color: #ff8a2b; }

/* uploaded cover shown in the grid card (the gradient overlay keeps the title readable) */
.wcard-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.wcard:hover .wcard-img { transform: scale(1.05); }
.wcard-img + .wcard-body { background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.7) 100%); }

/* a project without a case study is a plain card, not a link: no pointer, and no arrow promising a page */
.case.no-link, .wcard.no-link { cursor: default; }
.case.no-link .case-arrow { visibility: hidden; }
