/* ==========================================================================
   index-2026.css — Responsive Bento Grid Landing Page for jcachat.com
   System-aware light/dark mode, zero JS, Inter + JetBrains Mono
   ========================================================================== */

:root {
  /* Light Theme (Default) */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-hover: #ffffff;
  --surface-subtle: #f1f5f9;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent: #0f172a;
  --accent-text: #ffffff;
  --accent-hover: #1e293b;
  --highlight: #0284c7;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 10px 24px -10px rgba(15, 23, 42, 0.12), 0 2px 6px -2px rgba(15, 23, 42, 0.05);

  --radius-card: 16px;
  --radius-pill: 10px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark Theme (System-Aware) */
    --bg: #09090b;
    --surface: #111114;
    --surface-hover: #16161a;
    --surface-subtle: #1c1c21;
    --border: #27272a;
    --border-hover: #3f3f46;
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #fafafa;
    --accent-text: #09090b;
    --accent-hover: #e4e4e7;
    --highlight: #38bdf8;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 14px 28px -12px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04);
  }
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 1.25rem;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

/* 12-Column Responsive Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.span-12 { grid-column: span 12; }
.span-7  { grid-column: span 7; }
.span-6  { grid-column: span 6; }
.span-5  { grid-column: span 5; }
.span-4  { grid-column: span 4; }

/* Base Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

/* Monospace Metadata Labels */
.mono-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ==========================================================================
   Hero / Identity Tile
   ========================================================================== */
.hero-card {
  grid-column: span 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  padding: 1.85rem;
}

.hero-identity {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  min-width: 0;
}

.avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background-color: var(--surface-subtle);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.hero-name {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.hero-tagline {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 52ch;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.icon-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.icon-chip svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-chip:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* Primary CTA */
.hero-cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  flex-shrink: 0;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.8rem 1.25rem;
  border-radius: 12px;
  white-space: nowrap;
  transition: background-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.cta-primary .arrow-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.16s ease;
}

.cta-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.cta-primary:hover .arrow-icon {
  transform: translateX(3px);
}

.cta-note {
  text-transform: none;
  letter-spacing: 0.01em;
}

/* ==========================================================================
   Featured Flagship Cards
   ========================================================================== */
.feature-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  cursor: pointer;
}

.feature-card:hover,
.feature-card:focus-visible {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  outline: none;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ext-arrow {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.18s ease, transform 0.18s ease;
}

.feature-card:hover .ext-arrow {
  stroke: var(--highlight);
  transform: translate(2px, -2px);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.card-domain {
  margin-top: 0.4rem;
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--text-muted);
}

/* ==========================================================================
   Grouped Academic & Media Tile
   ========================================================================== */
.archive-card {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.archive-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.archive-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 48ch;
}

.pill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.pill-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.72rem 0.95rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: border-color 0.16s ease, transform 0.16s ease, background-color 0.16s ease;
}

.pill-link:hover,
.pill-link:focus-visible {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-2px);
  outline: none;
}

.pill-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
}

.pill-meta {
  font-size: 0.68rem;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: 1.75rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

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

/* Focus Accessibility */
a:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 820px) {
  .hero-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-cta-wrap {
    width: 100%;
    align-items: flex-start;
  }

  .cta-primary {
    width: 100%;
    justify-content: center;
  }

  .span-7,
  .span-5,
  .span-4 {
    grid-column: span 6;
  }

  .pill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  body {
    padding: 1.25rem 0.9rem;
  }

  .hero-card {
    padding: 1.35rem;
  }

  .hero-identity {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .avatar {
    width: 72px;
    height: 72px;
  }

  .hero-name {
    font-size: 1.4rem;
  }

  .span-7,
  .span-6,
  .span-5,
  .span-4 {
    grid-column: span 12;
  }

  .pill-grid {
    grid-template-columns: 1fr;
  }
}
