:root {
  --bg: #141414; --fg: #ededed; --muted: #8c8c8c; --dim: #555;
  --surface: #1e1e1e; --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --max-w: 1120px; --gutter: clamp(20px,5vw,60px);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: clip; color-scheme: dark; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--fg); -webkit-font-smoothing: antialiased; overflow-x: clip; }
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }

nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: 20px 0; }
.nav-bg { position: absolute; inset: 0; background: rgba(20,20,20,0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
nav.scrolled .nav-bg { border-color: var(--border); }
.nav-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.nav-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; object-position: 50% 10%; flex-shrink: 0; }
.nav-name { font-size: 14px; font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { font-size: 14px; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--fg); }
.nav-cta { font-size: 13px; font-weight: 500; color: var(--fg); background: var(--surface); border: 1px solid var(--border); padding: 8px 18px; border-radius: 6px; text-decoration: none; transition: background 0.2s, border-color 0.2s; }
.nav-cta:hover { background: rgba(255,255,255,0.06); border-color: var(--border-hover); }

.case-header { padding: 140px 0 0; }
.case-eyebrow { font-size: 13px; color: var(--dim); margin-bottom: 20px; }
.case-h1 { font-family: var(--font-serif); font-size: clamp(36px,5vw,68px); font-weight: 400; line-height: 1.1; letter-spacing: -0.02em; max-width: 820px; margin-bottom: 48px; }
.case-hero-img { width: 100%; height: clamp(300px,45vw,580px); object-fit: cover; border-radius: 12px; display: block; border: 1px solid var(--border); margin-bottom: 60px; }

.case-meta-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding: 40px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 80px; }
.meta-item-label { font-size: 11px; color: var(--dim); margin-bottom: 8px; letter-spacing: 0.04em; text-transform: uppercase; }
.meta-item-value { font-size: 14px; color: var(--muted); line-height: 1.5; }

.case-body { display: grid; grid-template-columns: 180px 1fr; gap: 80px; align-items: start; }
.case-sidebar { position: sticky; top: 100px; }
.sidebar-nav { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav a { font-size: 13px; color: var(--dim); text-decoration: none; padding: 6px 0; display: block; border-left: 2px solid transparent; padding-left: 12px; transition: color 0.2s, border-color 0.2s; }
.sidebar-nav a:hover { color: var(--muted); }
.sidebar-nav a.active { color: var(--fg); border-color: var(--fg); }

.case-section { margin-bottom: 72px; }
.case-section:last-child { margin-bottom: 0; }
.section-title { font-size: 12px; color: var(--dim); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 28px; }
.section-body p { font-size: 16px; color: var(--muted); line-height: 1.75; font-weight: 300; margin-bottom: 20px; }
.section-body p:last-child { margin-bottom: 0; }
.section-body p strong { color: var(--fg); font-weight: 400; }
.section-img { width: 100%; border-radius: 10px; display: block; border: 1px solid var(--border); margin: 32px 0; }
.section-quote { border-left: 2px solid var(--border); padding-left: 24px; margin: 32px 0; }
.section-quote p { font-size: 15px; color: var(--muted); line-height: 1.65; font-style: italic; }
.section-quote cite { display: block; font-size: 12px; color: var(--dim); font-style: normal; margin-top: 10px; }

.case-stat { margin: 48px 0; }
.stat-num { font-family: var(--font-serif); font-size: clamp(56px,8vw,100px); color: var(--fg); line-height: 1; }
.stat-desc { font-size: 13px; color: var(--muted); font-weight: 300; max-width: 320px; line-height: 1.55; margin-top: 10px; }

.case-bottom { padding: 80px 0; border-top: 1px solid var(--border); }
.bottom-links { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.bottom-link { font-size: 14px; color: var(--muted); text-decoration: none; display: flex; align-items: center; gap: 8px; transition: color 0.2s; }
.bottom-link:hover { color: var(--fg); }

.cta-block { text-align: center; padding: 80px 0; border-top: 1px solid var(--border); }
.cta-title { font-family: var(--font-serif); font-size: clamp(40px,6vw,72px); font-weight: 400; margin-bottom: 20px; }
.cta-desc { font-size: 15px; color: var(--muted); margin-bottom: 40px; }
.cta-btns { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.cta-btn { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; color: var(--fg); background: var(--surface); border: 1px solid var(--border); padding: 12px 24px; border-radius: 6px; text-decoration: none; transition: background 0.2s, border-color 0.2s; }
.cta-btn:hover { background: rgba(255,255,255,0.06); border-color: var(--border-hover); }

footer { padding: 24px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-copy { font-size: 13px; color: var(--dim); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; color: var(--dim); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--muted); }

:focus-visible { outline: 2px solid rgba(255,255,255,0.35); outline-offset: 3px; border-radius: 3px; }

@media (max-width: 860px) {
  .case-meta-grid { grid-template-columns: repeat(2,1fr); }
  .case-body { grid-template-columns: 1fr; }
  .case-sidebar { position: static; display: none; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .case-meta-grid { grid-template-columns: 1fr 1fr; }
}
