:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --bg-soft: #0f1a14;
  --card: #121c16;
  --card-strong: #16241b;
  --text: #f4f6fa;
  --muted: #98a6a0;
  --accent: #7dffb3;
  --accent-strong: #4cff95;
  --accent-warm: #c9ff6a;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 40px rgba(5, 9, 16, 0.45);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: "Space Grotesk", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(125, 255, 179, 0.12), transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(201, 255, 106, 0.1), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(76, 255, 149, 0.14), transparent 40%),
    linear-gradient(120deg, rgba(12, 22, 16, 0.92), rgba(11, 15, 20, 0.92));
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  opacity: 0.06;
  background-image: repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 6px);
  z-index: -1;
  pointer-events: none;
}

.ambient {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  filter: hue-rotate(0deg) saturate(1.15);
  animation: ambientShift 18s linear infinite;
}

.ambient::before {
  content: "";
  position: absolute;
  inset: -20%;
  background-image: url("assets/pattern.svg");
  background-repeat: repeat;
  background-size: 420px 236px;
  opacity: 0.24;
  mix-blend-mode: lighten;
  filter: brightness(1.25) contrast(1.15);
  animation: patternDrift 42s linear infinite;
}

.orb {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  animation: floatOrb 22s ease-in-out infinite;
}

.orb-1 {
  top: -22vmax;
  left: -12vmax;
  background: radial-gradient(circle at 30% 30%, rgba(125, 255, 179, 0.85), rgba(125, 255, 179, 0));
  animation-duration: 26s;
}

.orb-2 {
  bottom: -28vmax;
  right: -18vmax;
  width: 70vmax;
  height: 70vmax;
  background: radial-gradient(circle at 40% 40%, rgba(76, 255, 149, 0.85), rgba(76, 255, 149, 0));
  animation-duration: 30s;
  animation-delay: -8s;
}

.orb-3 {
  top: 18vmax;
  right: -22vmax;
  width: 48vmax;
  height: 48vmax;
  background: radial-gradient(circle at 50% 50%, rgba(201, 255, 106, 0.85), rgba(201, 255, 106, 0));
  animation-duration: 24s;
  animation-delay: -12s;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 32px 6vw 64px;
  display: flex;
  flex-direction: column;
  gap: 56px;
  opacity: 0;
  transform: translateY(14px);
  animation: pageIn 0.8s ease forwards;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.brand-title {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  font-size: 14px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(32px, 4vw, 56px);
  margin: 12px 0 16px;
  line-height: 1.05;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", monospace;
  color: var(--accent-warm);
}

.lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin: 28px 0 16px;
  flex-wrap: wrap;
}

.hero-note {
  font-size: 14px;
  color: rgba(164, 176, 194, 0.8);
  font-family: "IBM Plex Mono", monospace;
}

.hero-panel {
  display: grid;
  gap: 20px;
}

.panel-card {
  background: var(--card);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.panel-card-secondary {
  background: linear-gradient(135deg, rgba(125, 255, 179, 0.18), rgba(76, 255, 149, 0.08));
}

.panel-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.panel-title {
  font-size: 24px;
  font-weight: 600;
  margin: 10px 0 8px;
}

.panel-text {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

.panel-metric {
  font-size: 48px;
  font-weight: 700;
  color: var(--text);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-header h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 36px);
}

.section-header p {
  margin: 0;
  color: var(--muted);
}

.gallery-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 26px;
  border-radius: 18px;
  border: 1px dashed var(--border);
  color: var(--muted);
  background: rgba(10, 14, 11, 0.6);
}

.gallery-item {
  position: relative;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  animation: tileIn 0.55s ease forwards;
  animation-delay: calc(var(--delay, 0) * 0.06s);
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.gallery-item:focus-visible {
  box-shadow: 0 0 0 3px rgba(125, 255, 179, 0.35);
}

.gallery-item img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.gallery-meta {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
  background: rgba(12, 17, 25, 0.8);
}

.gallery-meta span:first-child {
  color: var(--text);
  font-weight: 600;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: var(--accent);
  color: #0b0f14;
  box-shadow: 0 10px 24px rgba(125, 255, 179, 0.28);
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--accent-strong);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(125, 255, 179, 0.4);
  color: var(--accent);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 20, 0.7);
  backdrop-filter: blur(6px);
}

.modal-content {
  position: relative;
  z-index: 1;
  background: var(--card-strong);
  border-radius: 20px;
  padding: 28px;
  width: min(520px, 92vw);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 18px;
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.modal.is-open .modal-content {
  transform: translateY(0);
}

.modal-content-wide {
  width: min(800px, 94vw);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  cursor: pointer;
}

.apply-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.field input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0d131b;
  color: var(--text);
  font-size: 15px;
}

.field input:focus-visible {
  border-color: rgba(125, 255, 179, 0.6);
  box-shadow: 0 0 0 2px rgba(125, 255, 179, 0.18);
}

.preview {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.preview img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.helper {
  font-size: 13px;
  color: rgba(164, 176, 194, 0.8);
}

.error {
  background: rgba(255, 107, 107, 0.18);
  color: #ffb4b4;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.status {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  background: rgba(125, 255, 179, 0.15);
  color: var(--accent);
  border: 1px solid rgba(125, 255, 179, 0.35);
}

.art-view {
  display: grid;
  gap: 16px;
}

.modal-img {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  border-radius: 16px;
  background: #0b0f14;
}

.art-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.art-title {
  font-size: 18px;
  font-weight: 600;
}

.twitter-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

body.modal-open {
  overflow: hidden;
}

@keyframes pageIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tileIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes floatOrb {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(7vmax, -5vmax, 0) scale(1.1);
  }
  100% {
    transform: translate3d(-5vmax, 6vmax, 0) scale(0.95);
  }
}

@keyframes ambientShift {
  0% {
    filter: hue-rotate(0deg) saturate(1.15);
  }
  50% {
    filter: hue-rotate(18deg) saturate(1.25);
  }
  100% {
    filter: hue-rotate(0deg) saturate(1.15);
  }
}

@keyframes patternDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-120px, 80px, 0);
  }
}

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

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 24px 5vw 48px;
    gap: 40px;
  }

  .logo {
    width: 44px;
    height: 44px;
  }

  .brand-title {
    font-size: 18px;
  }

  .brand-subtitle {
    letter-spacing: 0.16em;
  }

  .site-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .nav-link {
    font-size: 12px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery-item img {
    height: 200px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-panel {
    gap: 16px;
  }

  .panel-card {
    padding: 22px;
  }

  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }

  .modal-content,
  .modal-content-wide {
    width: min(96vw, 560px);
    max-height: 88vh;
    overflow: auto;
  }

  .modal-img {
    max-height: 50vh;
  }

  .art-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-copy h1 {
    font-size: 30px;
  }

  .lead {
    font-size: 16px;
  }

  .hero-note {
    font-size: 12px;
  }

  .gallery-item img {
    height: 180px;
  }

  .btn {
    padding: 12px 18px;
  }

  .orb {
    filter: blur(48px);
    opacity: 0.5;
  }

  .ambient::before {
    opacity: 0.2;
    background-size: 380px 214px;
  }
}
