/* RefineAnything project page — static, GitHub Pages friendly */

:root {
  --bg: #0b0f14;
  --bg-elevated: #121922;
  --surface: #161e2a;
  --text: #e8edf5;
  --muted: #8b9ab0;
  --accent: #5eead4;
  --accent-dim: #2dd4bf66;
  --border: #243044;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --radius: 12px;
  --max: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #7ff5e4;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  border-radius: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  color: var(--accent);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

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

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

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero__bg {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, var(--accent-dim), transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 60%, #6366f133, transparent 50%),
    linear-gradient(180deg, #0b0f14, #121922);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 4rem 1.5rem 3.5rem;
}

.hero__badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(2rem, 5vw, 2.85rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  max-width: 18ch;
}

.hero__tagline {
  margin: 0 0 1.75rem;
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.1rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn--primary {
  background: var(--accent);
  color: #042f2e;
}

.btn--primary:hover {
  background: #7ff5e4;
  color: #022c2a;
}

.btn--ghost {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface);
}

.btn--ghost:hover {
  border-color: var(--muted);
  background: var(--bg-elevated);
}

.btn--disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.section--alt {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
}

.section h3 {
  font-size: 1.15rem;
  margin: 2rem 0 0.75rem;
  color: var(--text);
}

.figure {
  margin: 1.5rem 0 0;
}

.figure figcaption {
  margin-top: 0.65rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.5rem;
}

.card__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 0.85rem;
  color: var(--accent);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.citation {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
}

.citation pre {
  margin: 0;
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #c8d4e6;
  white-space: pre-wrap;
  word-break: break-word;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--accent);
}

@media (max-width: 640px) {
  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero__inner {
    padding-top: 2.5rem;
  }
}
