:root {
  --card: #191919;
  --ring: #ffe0c2;
  --input: #484848;
  --muted: #222222;
  --accent: #2a2a2a;
  --border: #201e18;
  --radius: 0.5rem;
  --chart-1: #ffe0c2;
  --chart-2: #393028;
  --chart-3: #2a2a2a;
  --chart-4: #42382e;
  --chart-5: #ffe0c1;
  --popover: #191919;
  --primary: #ffe0c2;
  --sidebar: #18181b;
  --secondary: #393028;
  --background: #111111;
  --foreground: #eeeeee;
  --destructive: #e54d2e;
  --sidebar-ring: #d4d4d8;
  --sidebar-accent: #27272a;
  --sidebar-border: #27272a;
  --card-foreground: #eeeeee;
  --sidebar-primary: #1d4ed8;
  --muted-foreground: #b4b4b4;
  --accent-foreground: #eeeeee;
  --popover-foreground: #eeeeee;
  --primary-foreground: #081a1b;
  --sidebar-foreground: #f4f4f5;
  --secondary-foreground: #ffe0c2;
  --destructive-foreground: #ffffff;
  --sidebar-accent-foreground: #f4f4f5;
  --sidebar-primary-foreground: #ffffff;

  --color-card: var(--card);
  --color-ring: var(--ring);
  --color-input: var(--input);
  --color-muted: var(--muted);
  --color-accent: var(--accent);
  --color-border: var(--border);
  --color-radius: var(--radius);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --color-popover: var(--popover);
  --color-primary: var(--primary);
  --color-sidebar: var(--sidebar);
  --color-secondary: var(--secondary);
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-destructive: var(--destructive);
  --color-sidebar-ring: var(--sidebar-ring);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-border: var(--sidebar-border);
  --color-card-foreground: var(--card-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent-foreground: var(--accent-foreground);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary-foreground: var(--primary-foreground);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);

  --bg: var(--background);
  --surface: var(--card);
  --text: var(--foreground);
  --muted-text: var(--muted-foreground);
  --action: var(--primary);
}

* { box-sizing: border-box; }
html,
body {
  overscroll-behavior-y: none;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.shell { width: min(1100px, 92%); margin: 0 auto; }
.site-header, .site-footer {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 30;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}
.site-footer { border-top: 1px solid var(--border); border-bottom: none; margin-top: 2rem; padding: 1rem 0; }
.nav-wrap { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; }
.brand {
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.brand-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: #ffffff;
  flex: 0 0 auto;
}
.nav-list { list-style: none; padding: 0; margin: 0; display: flex; gap: 1rem; }
.nav-list a { text-decoration: none; color: var(--text); }
.hero { padding: 3rem 0 1rem; }
.landing-hero {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  min-height: clamp(30rem, 88vh, 52rem);
  min-height: clamp(30rem, 88svh, 52rem);
  display: grid;
  align-items: end;
  overflow: hidden;
  z-index: 0;
  border-bottom: 1px solid color-mix(in oklab, var(--ring) 25%, transparent);
}
.landing-hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: -2;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translate3d(0, 0, 0) rotate(0.01deg);
  transition: opacity 180ms ease;
}
.landing-hero-active .landing-hero-canvas {
  opacity: 1;
}
.landing-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 52% 18%, rgba(255, 224, 194, 0.14), transparent 46%),
    linear-gradient(to bottom, rgba(35, 24, 17, 0.08) 30%, rgba(17, 14, 13, 0.82) 84%, var(--bg) 100%);
}
.landing-hero-content {
  position: relative;
  z-index: 1;
  width: min(980px, 92%);
  margin: 0 auto;
  padding: 0 0 10vh;
  padding: 0 0 10svh;
}
.landing-hero-content h1 {
  font-size: clamp(2rem, 6.8vw, 5rem);
  margin: 0.3rem 0 0.8rem;
  max-width: 14ch;
}
.landing-kicker {
  margin: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--ring);
}
.landing-hero-content > p { max-width: 58ch; }
.landing-scroll {
  margin-top: 1rem;
  color: var(--muted-text);
  font-size: 0.92rem;
  animation: landingFloat 2.6s ease-in-out infinite;
}
@keyframes landingFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
h1, h2, h3 { line-height: 1.2; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.project-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; }
.project-card a { color: var(--action); text-decoration: none; }
.empty-state {
  background: color-mix(in oklab, var(--surface) 92%, var(--secondary));
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 1rem;
  color: var(--muted-text);
}


.project-warning {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid color-mix(in oklab, var(--action) 28%, var(--border));
  background: color-mix(in oklab, var(--surface) 78%, var(--action));
}

.meta { color: var(--muted-text); font-size: 0.95rem; }
.tag-list { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tag { background: var(--secondary); color: var(--secondary-foreground); padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.82rem; }
.btn { display: inline-block; background: var(--action); color: var(--primary-foreground); text-decoration: none; padding: 0.6rem 0.9rem; border-radius: 8px; border: 0; cursor: pointer; font: inherit; }
.btn-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.controls { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; display: grid; gap: 0.5rem; margin: 1rem 0; }
.contact-form { margin: 0; background: transparent; border: 0; padding: 0; max-width: none; }
.contact-form label { font-size: 0.9rem; color: var(--muted-text); }
.contact-form .btn { width: 100%; margin-top: 0.25rem; }
.contact-card {
  position: relative;
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: color-mix(in oklab, var(--surface) 92%, var(--secondary));
}
.contact-card-main {
  padding: 1.4rem;
  border-bottom: 1px solid var(--border);
}
.contact-card-main h1 { margin-top: 0; margin-bottom: 0.6rem; }
.contact-card-main p { margin-top: 0; color: var(--muted-text); max-width: 62ch; }
.contact-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.contact-highlights span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.24rem 0.65rem;
  font-size: 0.8rem;
  background: var(--surface);
  color: var(--secondary-foreground);
}
.contact-card-form-wrap {
  padding: 1.2rem;
  background: color-mix(in oklab, var(--surface) 88%, #000000);
}
@media (min-width: 860px) {
  .contact-card {
    grid-template-columns: 1.4fr 1fr;
    min-height: 420px;
  }
  .contact-card-main {
    border-bottom: 0;
    border-right: 1px solid var(--border);
    padding: 2rem;
  }
  .contact-card-form-wrap { padding: 2rem; }
}


.rules-box {
  background: color-mix(in oklab, var(--surface) 86%, var(--secondary));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1rem 1.1rem;
  margin: 0.75rem 0 1rem;
}
.rules-box h3:first-child { margin-top: 0; }
.rules-box p:last-child { margin-bottom: 0; }

.search-popover { position: relative; }
.search-popover-content {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  width: 100%;
  z-index: 50;
  background: var(--popover);
  color: var(--popover-foreground);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.search-popover-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  border-radius: 6px;
  padding: 0.55rem 0.6rem;
  display: grid;
  gap: 0.15rem;
}
.search-popover-item:hover,
.search-popover-item[aria-selected="true"] { background: var(--secondary); color: var(--secondary-foreground); }
.search-popover-title { font-weight: 600; }
.search-popover-meta { color: var(--muted-foreground); font-size: 0.82rem; }
.search-popover-item[aria-selected="true"] .search-popover-meta,
.search-popover-item:hover .search-popover-meta { color: var(--secondary-foreground); }
input, select, textarea {
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}
input:focus, select:focus, button:focus, a:focus { outline: 3px solid var(--ring); outline-offset: 2px; }
.tag-filter { display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; }


.tag-input-shell {
  display: grid;
  gap: 0.5rem;
}

.tag-token-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.4rem;
  background: var(--surface);
}

.tag-token {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 1.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 0.25rem 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--background);
}

.tag-token-remove {
  border: 0;
  background: transparent;
  color: var(--muted-text);
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tag-token-remove:hover {
  color: var(--text);
  background: var(--secondary);
}

.tag-filter-input {
  border: 0;
  background: transparent;
  min-width: 10rem;
  flex: 1;
  padding: 0.25rem;
}

.tag-filter-input:focus {
  outline: none;
}

.tag-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-suggestion {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 0.22rem 0.6rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.tag-suggestion:hover {
  background: var(--secondary);
  color: var(--secondary-foreground);
}
.pagination { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.pagination button { border: 1px solid var(--border); background: var(--surface); padding: 0.4rem 0.7rem; border-radius: 6px; }
.pagination button[aria-current="page"] { background: var(--secondary); border-color: var(--ring); color: var(--secondary-foreground); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--surface); color: var(--text); padding: 0.4rem; border: 1px solid var(--border); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sticky-footer {
  --footer-height: 70vh;
  --footer-reveal: 0;
  margin-top: 2rem;
  position: relative;
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
}

.sticky-footer-clip {
  position: relative;
  height: var(--footer-height);
}

.sticky-footer-track {
  position: sticky;
  top: calc(100vh - var(--footer-height));
  height: var(--footer-height);
}

.sticky-footer-panel {
  background:
    radial-gradient(circle at top right, color-mix(in oklab, var(--primary) 16%, transparent) 0%, transparent 38%),
    radial-gradient(circle at bottom left, color-mix(in oklab, var(--secondary) 24%, transparent) 0%, transparent 40%),
    linear-gradient(145deg, color-mix(in oklab, var(--card) 92%, black), color-mix(in oklab, var(--muted) 85%, black));
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transform: translateY(calc((1 - var(--footer-reveal)) * 100vh));
}

.sticky-footer-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, color-mix(in oklab, var(--background) 72%, transparent), transparent);
}

.sticky-footer-panel::after {
  content: "";
  position: absolute;
  top: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(50%, 34rem);
  border-top: 2px solid color-mix(in oklab, var(--foreground) 45%, var(--border));
  pointer-events: none;
}

.sticky-footer-shell {
  position: relative;
  z-index: 1;
  min-height: var(--footer-height);
  display: grid;
  grid-template-rows: 1fr auto;
  gap: clamp(1.4rem, 2.8vw, 2.5rem);
  padding: clamp(1.4rem, 2.8vw, 3rem) 0;
}

[data-footer-item] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 520ms ease, transform 620ms cubic-bezier(.22,.61,.36,1);
  transition-delay: var(--footer-item-delay, 0s);
}

[data-footer-item].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.sticky-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.2rem 1.8rem;
  align-content: start;
}

.footer-nav-section h2 {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted-text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}

.footer-nav-section ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.3rem;
}

.footer-nav-section a {
  color: var(--muted-text);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-nav-section a:hover {
  color: var(--text);
}

.sticky-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
}

.sticky-footer-title {
  margin: 0;
  font-size: clamp(2.1rem, 9vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  margin-left: 0.12em;
  gap: 0.1em;
  background: linear-gradient(90deg, var(--foreground), var(--muted-foreground), color-mix(in oklab, var(--foreground) 72%, transparent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sticky-footer-title-icon {
  display: inline-flex;
  width: 0.9em;
  height: 0.9em;
  margin-bottom: 0.03em;
  color: var(--foreground);
}

.sticky-footer-title-icon .brand-icon {
  width: 100%;
  height: 100%;
  color: currentColor;
}

.sticky-footer-subtitle,
.sticky-footer-meta p {
  margin: 0.5rem 0 0;
  color: var(--muted-text);
  font-size: 0.9rem;
}

.sticky-footer-meta {
  text-align: right;
}

.social-list {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: inline-flex;
  gap: 0.45rem;
}

.social-list a {
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--muted-text);
  text-decoration: none;
  background: color-mix(in oklab, var(--muted) 80%, transparent);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.8rem;
}

.social-list a:hover {
  color: var(--primary-foreground);
  background: linear-gradient(120deg, var(--primary), var(--secondary));
}

@media (max-width: 640px) {
  .sticky-footer-meta {
    text-align: left;
  }
}

.dialog-open {
  overflow: hidden;
}

.btn-compact {
  padding: 0.42rem 0.8rem;
  font-size: 0.85rem;
}

.dialog-root {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.dialog-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(transparent 1px, rgb(0 0 0 / 0.82) 1px);
  background-size: 4px 4px;
  backdrop-filter: brightness(1.2) blur(3px);
  animation: dialog-fade-in 160ms ease-out;
}

.dialog-content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 32rem);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--card);
  padding: 1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  display: grid;
  gap: 0.8rem;
  animation: dialog-zoom-in 180ms cubic-bezier(.22,.61,.36,1);
}

.dialog-header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.dialog-header p {
  margin: 0.4rem 0 0;
  color: var(--muted-text);
}

.dialog-close {
  justify-self: end;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent);
  color: var(--foreground);
  width: 2rem;
  height: 2rem;
  cursor: pointer;
}

@keyframes dialog-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dialog-zoom-in {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.admin-shell {
  max-width: 34rem;
}

.admin-form {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.admin-form input[type='password'] {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card);
  color: var(--foreground);
  padding: 0.55rem 0.7rem;
}

.admin-honeypot {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
}

.admin-message {
  min-height: 1.25rem;
  margin: 0;
  color: var(--muted-text);
}

.admin-shell-wide {
  max-width: 100%;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
}

@media (min-width: 980px) {
  .admin-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.8rem;
  font-size: 0.92rem;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--border);
  text-align: left;
  padding: 0.4rem;
  vertical-align: top;
}

.admin-table td button {
  margin-right: 0.4rem;
  margin-bottom: 0.3rem;
}

.admin-form input,
.admin-form textarea,
.admin-form select,
#admin-search {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card);
  color: var(--foreground);
  padding: 0.55rem 0.7rem;
}

.admin-row-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0.8rem 0;
}

.admin-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  max-width: 22rem;
  z-index: 120;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: var(--card);
  color: var(--foreground);
  padding: 0.7rem 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.admin-toast[data-kind='success'] {
  border-color: color-mix(in oklab, #22c55e 45%, var(--border));
}

.admin-toast[data-kind='error'] {
  border-color: color-mix(in oklab, #ef4444 55%, var(--border));
}

.admin-create-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.admin-create-modal-content {
  width: min(92vw, 48rem);
  max-height: 90vh;
  overflow: auto;
}
