@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Inter:wght@400;500;600&display=swap');

* { box-sizing: border-box; }
html { scroll-behavior: auto; overscroll-behavior-y: none; }
body { margin: 0; background: #0c1728; color: #e9f0f9; overscroll-behavior-y: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
a { outline-offset: 4px; }

.site {
  --bg: #0c1728;
  --panel: #111f32;
  --border: #2b3d52;
  --text: #e9f0f9;
  --muted: #9cacc0;
  --accent: #60a5fa;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  background: radial-gradient(circle at 57% 36%, #10223a 0, #0c1728 48%, #0a1423 100%);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}
.site.case-view { background: #0c1728; }
.site a { transition: color .18s ease, border-color .18s ease, background-color .18s ease; }
.site a:hover { color: var(--accent); }
.site-particles {
  position: fixed;
  z-index: 0;
  top: 78px;
  left: 0;
  width: 100%;
  height: calc(100vh - 78px);
  pointer-events: none;
  transform: translateZ(0);
  contain: strict;
}

.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--border); background: #0c1728; transition: background-color .25s ease, box-shadow .25s ease; }
.site-header.scrolled { background: rgba(12, 23, 40, .72); box-shadow: 0 10px 30px rgba(3, 11, 22, .18); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.site-header-inner { height: 78px; max-width: 1512px; padding: 0 42px; margin: auto; display: flex; align-items: center; gap: 55px; }
.site-brand { font: 500 21px 'DM Mono', monospace; letter-spacing: -.065em; white-space: nowrap; }
.site-brand span, .site-brand i { color: var(--accent); font-style: normal; }
.site-navigation { display: flex; align-items: center; margin-left: auto; }
.site-navigation a { font: 12px 'DM Mono', monospace; color: var(--muted); white-space: nowrap; }
.site-navigation a.active { color: var(--accent); }
.site-navigation a.active::before { content: '[ '; }
.site-navigation a.active::after { content: ' ]'; }
.social-links { display: flex; align-items: center; gap: 18px; border-left: 1px solid var(--border); padding-left: 25px; }
.social-links a { display: flex; align-items: center; gap: 7px; font: 11px 'DM Mono', monospace; color: var(--muted); white-space: nowrap; }
.social-links svg { flex: none; stroke: var(--accent); }

.page-shell { position: relative; z-index: 1; max-width: 1512px; margin: 0 auto; display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 36px; padding: 34px 42px 64px; }
.explorer { position: sticky; top: 112px; align-self: start; padding-top: 3px; display: flex; flex-direction: column; gap: 17px; font: 11px 'DM Mono', monospace; color: var(--muted); }
.explorer-label { color: #768aa2; margin-bottom: 12px; }
.explorer a { overflow-wrap: anywhere; }
.explorer a.active { color: var(--accent); }
.page-main { min-width: 0; }
.page-eyebrow { margin: 0 0 30px; font: 400 19px/1.35 'DM Mono', monospace; letter-spacing: -.035em; color: var(--accent); }

.study-list { display: grid; gap: 14px; }
.study-row { display: grid; grid-template-columns: 255px minmax(0, 1fr); gap: 27px; align-items: center; padding: 18px; border: 1px solid #354a62; border-radius: 6px; background: linear-gradient(145deg, rgba(27, 47, 72, .97), rgba(14, 30, 50, .98)); box-shadow: 0 12px 26px rgba(2, 9, 19, .32), inset 0 1px rgba(255, 255, 255, .08); transition: transform .28s cubic-bezier(.2, .75, .2, 1), box-shadow .28s ease, border-color .28s ease; }
.study-row:hover, .study-row:focus-visible { border-color: #628bb8; transform: perspective(1000px) translateY(-4px) rotateX(1.1deg); box-shadow: 0 20px 36px rgba(2, 9, 19, .44), inset 0 1px rgba(255, 255, 255, .12); }
.study-image { width: 100%; overflow: hidden; border-radius: 3px; }
.study-image img { width: 100%; height: auto; }
.study-meta, .study-tags { font: 11px 'DM Mono', monospace; color: var(--accent); }
.study-meta i { color: #74869b; font-style: normal; }
.study-copy h2 { font-size: 27px; font-weight: 400; letter-spacing: -.04em; margin: 12px 0 8px; }
.study-copy p { font: 12px/1.65 'DM Mono', monospace; color: var(--muted); max-width: 700px; margin: 0 0 12px; }
.study-tags { color: #8295aa; }

.back-link { display: inline-block; font: 11px 'DM Mono', monospace; color: var(--muted); margin: 0 0 42px; }
.case-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 19px; }
.case-tags span { color: var(--accent); border: 1px solid #46617f; padding: 6px 10px; font: 10px 'DM Mono', monospace; }
.case-main h1 { font-size: clamp(36px, 3.7vw, 57px); font-weight: 400; letter-spacing: -.055em; line-height: 1.15; white-space: nowrap; margin: 0 0 17px; }
.case-summary { font: 14px/1.65 'DM Mono', monospace; color: var(--muted); max-width: 1000px; margin: 0 0 38px; }
.project-showcase h2, .project-story h2 { font: 400 11px 'DM Mono', monospace; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 18px; }
.gallery { width: 100%; touch-action: pan-y pinch-zoom; }
.gallery-stage { position: relative; display: flex; justify-content: center; align-items: center; width: 100%; }
.gallery-view { display: contents; }
.gallery-image { width: auto; height: auto; max-width: 100%; max-height: 680px; border: 1px solid #31445b; border-radius: 5px; user-select: none; -webkit-user-drag: none; }
.gallery-arrow { position: absolute; z-index: 1; top: 50%; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid #607b9b; border-radius: 50%; background: rgba(12, 25, 43, .78); color: #c9e1ff; cursor: pointer; opacity: .86; transform: translateY(-50%); transition: opacity .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.gallery-arrow:hover { opacity: 1; background: rgba(30, 57, 87, .95); border-color: var(--accent); transform: translateY(-50%) scale(1.08); }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.gallery-next svg { transform: rotate(180deg); }
.gallery-counter { margin-top: 16px; text-align: center; font: 11px 'DM Mono', monospace; color: #8295aa; }
.project-story { display: grid; grid-template-columns: 190px 1fr; gap: 28px; border-top: 1px solid var(--border); margin-top: 55px; padding-top: 24px; }
.project-story h2 { margin-top: 3px; }
.project-story > div { max-width: 840px; }
.project-story p { font-size: 16px; line-height: 1.75; color: #c4d1df; margin: 0 0 20px; }
.project-story p:last-child { margin-bottom: 0; }

@media (max-width: 1100px) {
  .social-links a span { display: none; }
  .social-links { gap: 16px; }
  .page-shell { grid-template-columns: 160px minmax(0, 1fr); }
  .study-row { grid-template-columns: 200px minmax(0, 1fr); gap: 20px; }
  .study-copy h2 { font-size: 23px; }
}
@media (max-width: 760px) {
  .site-header-inner { height: auto; min-height: 76px; display: grid; grid-template-columns: 1fr auto; gap: 0 20px; padding: 15px 22px; }
  .site-brand { grid-column: 1; }
  .social-links { grid-column: 2; grid-row: 1; border: 0; padding: 0; }
  .site-navigation { grid-column: 1 / -1; grid-row: 2; margin: 16px 0 0; padding-top: 13px; border-top: 1px solid var(--border); }
  .site-particles { top: 110px; height: calc(100vh - 110px); }
  .page-shell { grid-template-columns: 1fr; padding: 28px 22px 50px; }
  .explorer { display: none; }
  .page-eyebrow { font-size: 17px; margin-bottom: 22px; }
  .study-row { grid-template-columns: 150px minmax(0, 1fr); gap: 18px; }
  .study-copy h2 { font-size: 21px; }
  .study-copy p { display: none; }
  .case-main h1 { white-space: normal; }
  .project-story { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 520px) {
  .site-header-inner { padding-left: 18px; padding-right: 18px; }
  .site-brand { font-size: 17px; }
  .social-links { gap: 13px; }
  .social-links svg { width: 16px; height: 16px; }
  .site-navigation a { font-size: 11px; }
  .study-row { grid-template-columns: 1fr; gap: 12px; padding: 14px; }
  .study-copy h2 { margin: 7px 0; }
  .study-copy p { display: block; }
  .gallery-arrow { width: 36px; height: 36px; }
  .gallery-prev { left: 6px; }
  .gallery-next { right: 6px; }
  .case-summary { font-size: 12px; margin-bottom: 28px; }
  .case-tags { gap: 5px; }
  .case-tags span { font-size: 9px; }
  .project-story p { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .study-row, .gallery-image, .gallery-arrow { transition: none; }
  .study-row:hover, .study-row:focus-visible { transform: none; }
}
