/* Glint Research blog — dark + orange, matches the brand header */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0a;
  --bg-elev: #111111;
  --bg-card: #131313;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --text: #ededed;
  --text-dim: #9a9a9a;
  --text-mute: #6b6b6b;
  --accent: #ff6b1a;
  --accent-glow: rgba(255, 107, 26, 0.25);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Subtle dot grid that runs across the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(180deg, transparent 0%, black 12%, black 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 12%, black 88%, transparent 100%);
}

/* Floating logo #1 */
body::after {
  content: "";
  position: fixed;
  top: 12%;
  left: -8%;
  width: 620px;
  height: 620px;
  background-image: url('logo.svg');
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.045;
  filter: invert(1);
  pointer-events: none;
  z-index: 0;
  animation: drift-a 38s ease-in-out infinite;
}

@keyframes drift-a {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%      { transform: translate(40px, 30px) rotate(18deg); }
}

@keyframes drift-b {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%      { transform: translate(-50px, -25px) rotate(-22deg); }
}

@keyframes drift-c {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%      { transform: translate(30px, 40px) rotate(12deg); }
}

/* Floating logo #2 and #3 — injected as siblings of header */
.bg-float {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  background-repeat: no-repeat;
  background-size: contain;
  filter: invert(1);
  opacity: 0.04;
  will-change: transform;
}

.bg-float--a {
  top: 45%;
  right: -10%;
  width: 720px;
  height: 720px;
  background-image: url('logo.svg');
  animation: drift-b 52s ease-in-out infinite;
}

.bg-float--b {
  top: 78%;
  left: 5%;
  width: 380px;
  height: 380px;
  background-image: url('logo.svg');
  animation: drift-c 64s ease-in-out infinite;
  opacity: 0.035;
}

@media (prefers-reduced-motion: reduce) {
  body::after,
  .bg-float {
    animation: none;
  }
}

/* Make sure actual content sits above the decorations */
.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #ffa45e;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #0a0a0a 0%, #0c0c0c 100%);
  position: relative;
  overflow: hidden;
}

  .header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 24px 32px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    z-index: 2;
  }

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
  color: var(--text);
}

.logo {
  width: 48px;
  height: 48px;
  filter: invert(1);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand-name .underscore {
  color: var(--accent);
}

.brand-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  margin-top: 4px;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
}

.site-nav a {
  color: var(--text-dim);
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

.header-circuit {
  display: block;
  width: 100%;
  height: 60px;
  opacity: 0.7;
}

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 32px 96px;
  flex: 1;
  width: 100%;
}

/* Post */
.post {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 72px 88px;
  position: relative;
}

.post::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
  border-radius: 12px 12px 0 0;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-mute);
  margin-bottom: 18px;
  font-variant-numeric: tabular-nums;
}

.post-meta .dot {
  color: var(--text-mute);
  opacity: 0.5;
}

.post-meta .tag {
  background: rgba(255, 107, 26, 0.1);
  color: var(--accent);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.post-title {
  font-size: 44px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 36px;
}

.post-body h2 {
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  margin-top: 48px;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
  position: relative;
  padding-left: 18px;
}

.post-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.post-body h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 32px;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
  text-transform: lowercase;
}

.post-body p {
  color: var(--text);
  margin-bottom: 18px;
}

.post-body p.lead {
  font-size: 21px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.post-body em {
  font-style: italic;
  color: var(--accent);
}

.post-body strong {
  font-weight: 600;
  color: var(--text);
}

.post-body a {
  border-bottom: 1px solid var(--border-strong);
}

.post-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.huggingface-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.01em;
}

/* Signoff */
.signoff {
  margin-top: 32px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.7;
}

/* Edit note (meta callout for revisions) */
.post-body p.edit-note {
  background: rgba(255, 107, 26, 0.05);
  border: 1px solid rgba(255, 107, 26, 0.25);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 14px 18px;
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dim);
}

.post-body p.edit-note strong {
  color: var(--accent);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.post-body p.edit-note em {
  color: var(--text);
  font-style: italic;
}

.signoff-sub {
  font-size: 13px;
  color: var(--text-mute);
  font-style: italic;
}

/* Inline list (used in blog post) */
.inline-list {
  list-style: none;
  margin: 18px 0 22px;
  padding: 0;
}

.inline-list li {
  position: relative;
  padding: 12px 0 12px 26px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  line-height: 1.6;
}

.inline-list li:last-child {
  border-bottom: none;
}

.inline-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 12px;
  color: var(--accent);
  font-weight: 600;
}

.inline-list li strong {
  color: var(--accent);
  font-weight: 600;
}

/* Code blocks / formulas */
.post-body pre {
  background: #0c0c0c;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 16px 20px;
  margin: 18px 0;
  overflow-x: auto;
  font-family: "SF Mono", "Monaco", "Menlo", "Consolas", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.post-body code {
  font-family: "SF Mono", "Monaco", "Menlo", "Consolas", "Courier New", monospace;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: #ffd6b8;
}

.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 14px;
}

/* Older posts */
.more {
  margin-top: 48px;
  padding: 32px 36px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
}

.more h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}

.more .empty {
  color: var(--text-mute);
  font-size: 15px;
  font-style: italic;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: #050505;
  padding: 40px 32px;
  margin-top: auto;
}

  .footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
  }

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
}

.logo-small {
  width: 24px;
  height: 24px;
  filter: invert(1);
}

.footer-text {
  color: var(--text-dim);
  font-size: 14px;
  font-style: italic;
  margin-bottom: 18px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 18px;
  font-size: 13px;
}

.footer-links a {
  color: var(--text-dim);
}

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

.copyright {
  color: var(--text-mute);
  font-size: 12px;
  letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px 12px;
  }

  .site-nav {
    gap: 16px;
    font-size: 13px;
    flex-wrap: wrap;
  }

  .container {
    padding: 40px 20px 60px;
  }

  .post {
    padding: 40px 28px;
    border-radius: 12px;
  }

  .post-title {
    font-size: 32px;
  }

  .post-body h2 {
    font-size: 22px;
  }

  .post-body h3 {
    font-size: 16px;
  }

  .post-body p.lead {
    font-size: 19px;
  }

  .post-body pre {
    font-size: 12.5px;
    padding: 12px 14px;
  }

  .header-circuit {
    height: 40px;
  }
}

/* Dataset card (for dataset advert posts) */
.dataset-card {
  background: linear-gradient(135deg, rgba(255, 107, 26, 0.06), rgba(255, 107, 26, 0.02));
  border: 1px solid rgba(255, 107, 26, 0.2);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 24px 0 32px;
}

.dataset-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  border-bottom: none;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 107, 26, 0.12);
}

.dataset-link:hover {
  border-bottom: 1px solid rgba(255, 107, 26, 0.12);
  color: #ffa45e;
}

.dataset-icon {
  font-size: 20px;
}

.dataset-arrow {
  margin-left: auto;
  font-size: 16px;
}

.dataset-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 2px;
}

@media (max-width: 720px) {
  .dataset-card {
    padding: 18px 20px;
  }
  .dataset-stats {
    gap: 14px;
  }
  .stat {
    min-width: 60px;
  }
  .stat-value {
    font-size: 18px;
  }
}

/* Report quote */
.report-quote {
  margin: 20px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  opacity: 0.9;
}

/* Inline GIF embed */
.gif-embed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 24px 0;
}
.gif-embed img {
  max-width: 100%;
  width: 320px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.gif-embed--wide img {
  width: 100%;
  max-width: 760px;
}
.gif-caption {
  font-size: 13px;
  opacity: 0.6;
  font-style: italic;
}

/* Selection */
::selection {
  background: var(--accent);
  color: #0a0a0a;
}
