:root {
  color-scheme: dark;
  --bg: #101114;
  --surface: #191b20;
  --surface-2: #22252c;
  --text: #f3f0e8;
  --muted: #9d9fa8;
  --line: rgba(255, 255, 255, 0.1);
  --lime: #c7f36b;
  --violet: #a798ff;
  --radius: 26px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  overflow-x: hidden;
}
button, a { -webkit-tap-highlight-color: transparent; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.ambient { position: fixed; z-index: -1; width: 36rem; height: 36rem; border-radius: 50%; filter: blur(110px); opacity: .13; }
.ambient-one { background: var(--violet); top: -15rem; right: -10rem; }
.ambient-two { background: var(--lime); bottom: -20rem; left: -14rem; }

.nav { display: flex; align-items: center; justify-content: space-between; padding: 26px 0; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-weight: 760; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: #111; background: var(--lime); border-radius: 10px; font-size: 12px; font-weight: 900; transform: rotate(-4deg); }
.availability { color: var(--muted); font-size: 13px; }
.availability i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; background: var(--lime); border-radius: 50%; box-shadow: 0 0 12px var(--lime); }

.hero-copy { padding: clamp(76px, 12vw, 150px) 0 clamp(86px, 12vw, 145px); }
.eyebrow { margin: 0 0 18px; color: var(--lime); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; max-width: 960px; font-size: clamp(52px, 9.5vw, 126px); line-height: .9; letter-spacing: -.075em; font-weight: 760; }
h1 em { color: var(--muted); font-family: Georgia, serif; font-weight: 400; }
.hero-text { max-width: 540px; margin: 34px 0 0; color: var(--muted); font-size: clamp(18px, 2vw, 24px); line-height: 1.5; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.hero-meta span, .tag { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; color: #c4c4ca; font-size: 12px; }

.catalog-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 30px; }
h2 { margin: 0; font-size: clamp(34px, 5vw, 60px); letter-spacing: -.05em; }
.filters { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.025); }
.filter { padding: 9px 16px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; cursor: pointer; font: inherit; font-size: 13px; }
.filter.active { color: #111; background: var(--text); }

.catalog { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; min-height: 280px; }
.loading, .empty, .error { grid-column: 1 / -1; padding: 72px 28px; border: 1px solid var(--line); border-radius: var(--radius); text-align: center; color: var(--muted); background: var(--surface); }
.project-card { grid-column: span 6; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: transform .25s ease, border-color .25s ease; }
.project-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.2); }
.project-card:nth-child(3n + 1) { grid-column: span 7; }
.project-card:nth-child(3n + 2) { grid-column: span 5; }
.card-visual { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: radial-gradient(circle at 70% 15%, rgba(167,152,255,.35), transparent 40%), linear-gradient(145deg, #262931, #15161a); }
.card-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.visual-placeholder { display: flex; flex-direction: column; justify-content: space-between; height: 100%; padding: 24px; }
.visual-placeholder strong { align-self: end; font-size: clamp(64px, 10vw, 132px); line-height: 1; color: rgba(255,255,255,.075); letter-spacing: -.08em; }
.interface-badge { position: absolute; top: 18px; left: 18px; z-index: 2; padding: 8px 11px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; color: var(--text); background: rgba(16,17,20,.65); backdrop-filter: blur(12px); font-size: 11px; }
.shot-nav { position: absolute; z-index: 3; right: 14px; bottom: 14px; display: flex; gap: 6px; }
.shot-nav button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; color: var(--text); background: rgba(16,17,20,.7); cursor: pointer; backdrop-filter: blur(12px); }
.card-body { padding: 26px; }
.card-title-row { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.card-body h3 { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; }
.card-body p { min-height: 3em; margin: 14px 0 22px; color: var(--muted); line-height: 1.55; }
.card-arrow { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; font-size: 20px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.open-card { position: absolute; inset: 0; border: 0; background: transparent; cursor: pointer; }
.card-wrap { position: relative; }

.dialog { width: min(880px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 28px; color: var(--text); background: #16181d; box-shadow: 0 32px 120px rgba(0,0,0,.6); }
.dialog::backdrop { background: rgba(5,6,8,.72); backdrop-filter: blur(12px); }
.dialog-close { position: sticky; z-index: 5; top: 16px; float: right; display: grid; place-items: center; width: 42px; height: 42px; margin: 16px 16px -58px 0; border: 1px solid var(--line); border-radius: 50%; color: var(--text); background: rgba(16,17,20,.75); font-size: 28px; cursor: pointer; backdrop-filter: blur(12px); }
.dialog-gallery { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.dialog-gallery img { width: 100%; height: 100%; object-fit: cover; }
.dialog-gallery-nav { position: absolute; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 999px; background: rgba(16,17,20,.72); backdrop-filter: blur(12px); }
.dialog-gallery-nav button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; color: var(--text); background: rgba(255,255,255,.08); cursor: pointer; }
.dialog-gallery-nav span { min-width: 38px; color: var(--muted); text-align: center; font-size: 12px; }
.dialog-copy { padding: clamp(26px, 6vw, 58px); }
.dialog-copy h2 { padding-right: 45px; }
.dialog-copy p { color: #b4b5bc; line-height: 1.72; white-space: pre-line; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 13px 18px; border: 1px solid var(--line); border-radius: 13px; color: var(--text); text-decoration: none; font-weight: 720; }
.button.primary { color: #111; background: var(--lime); border-color: var(--lime); }
.footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 90px; padding: 28px 0 42px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

@media (max-width: 760px) {
  .shell { width: min(100% - 28px, 1180px); }
  .availability { display: none; }
  .hero-copy { padding-top: 68px; }
  .catalog-head { align-items: start; flex-direction: column; }
  .filters { max-width: 100%; overflow-x: auto; }
  .project-card, .project-card:nth-child(n) { grid-column: 1 / -1; }
  .footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
