/* Ale's Tech‑Noir Journal — professional, dark, neon accents */
:root {
  /* Core palette */
  --bg-0: #0b0b10;      /* near-black */
  --bg-1: #11131a;      /* panel */
  --bg-2: #171a23;      /* card */
  --text: #e6e6f0;      /* primary text */
  --muted: #9aa0b4;     /* secondary text */

  /* Accents (neon but tasteful) */
  --a-cyan: #75f0ff;
  --a-violet: #c77dff;
  --a-blue: #6ab0ff;

  /* Surfaces & effects */
  --surface: #1b1f2a;
  --border: rgba(255,255,255,0.08);
  --shadow-1: 0 8px 30px rgba(0,0,0,0.55);
  --shadow-2: 0 0 0 1px var(--border) inset;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }
html { background: var(--bg-0); }
body {
  margin: 96px 28px 120px;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  line-height: 1.6;
  background:
    radial-gradient(1200px 700px at 10% -10%, rgba(117,240,255,0.06), transparent 60%),
    radial-gradient(1000px 600px at 90% 10%, rgba(199,125,255,0.05), transparent 60%),
    linear-gradient(#0b0b10,#0b0b10);
}
main { max-width: 1100px; margin: 0 auto; }
h1 { font-size: 3rem; font-weight: 800; letter-spacing: .5px; margin: 0 0 8px; }
h2 { font-size: 1.9rem; font-weight: 800; letter-spacing: .2px; margin: 18px 0 12px; }
h3 { font-size: 1.15rem; font-weight: 700; margin: 10px 0 6px; }

/* Navbar: glass + subtle neon underline */
.navbar {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  background: rgba(17,19,26,0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-1);
}
.navbar nav { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.navbar .brand {
  font-weight: 800; text-decoration: none; color: var(--text); letter-spacing: .3px;
  border-bottom: 2px solid transparent;
}
.navbar .brand:hover { border-color: var(--a-cyan); }
.navbar ul { list-style: none; display: flex; gap: 10px; margin: 0; padding: 0; }
.navbar a { color: var(--text); text-decoration: none; padding: 10px 12px; border-radius: 10px; font-weight: 600; }
.navbar a:hover { background: rgba(255,255,255,0.06); }

/* Hero landing */
.hero-landing {
  display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: center;
  margin: 8px 0 24px; padding: 6px 0;
}
.sync-glyph { width: 220px; height: 220px; filter: drop-shadow(0 0 18px rgba(117,240,255,0.25)); }
.sync-glyph .core { fill: url(#glow); }
.sync-glyph .arc { fill: none; stroke: url(#glow); stroke-width: 6; opacity: .9; }
.sync-glyph .dot { fill: var(--a-cyan); }

.heading-pill {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, rgba(117,240,255,0.12), rgba(199,125,255,0.12));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow-2);
}
.tagline { font-size: 1.3rem; font-weight: 700; margin: 8px 0 18px; color: var(--muted); }

.cta-row { display: flex; gap: 12px; }
.btn.pill {
  background: linear-gradient(90deg, #191d28, #1e2230);
  color: var(--text); padding: 10px 16px; border-radius: var(--radius-pill);
  text-decoration: none; font-weight: 700; border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
}
.btn.pill:hover { border-color: rgba(117,240,255,0.45); }
.btn.ghost { background: transparent; border: 1px dashed rgba(199,125,255,0.45); }

/* Filters */
.filters { margin-top: 12px; }
.filter-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: rgba(27,31,42,.65); padding: 10px 12px; border-radius: var(--radius-md);
  border: 1px solid var(--border); box-shadow: var(--shadow-1);
}
.filter-row label { font-weight: 700; }
.filter-row select {
  border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px;
  background: #12151d; color: var(--text); font-weight: 600;
}
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: linear-gradient(90deg, rgba(117,240,255,0.12), rgba(199,125,255,0.12));
  color: var(--text); padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 1px solid var(--border);
}

/* Entries (hero cards) */
.hero-grid { display: flex; gap: 20px; flex-wrap: wrap; align-items: stretch; margin-top: 12px; }
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  flex: 1 1 320px; min-width: 300px; background: var(--bg-2);
  border: 1px solid var(--border); box-shadow: var(--shadow-1);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.hero:hover { transform: translateY(-2px); border-color: rgba(117,240,255,0.35); box-shadow: 0 18px 50px rgba(0,0,0,0.6), 0 0 0 1px rgba(117,240,255,0.2) inset; }
.hero img { width: 100%; height: 220px; object-fit: cover; display: block; filter: saturate(.95) contrast(1.05); }
.hero-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.badge {
  background: rgba(0,0,0,0.55); color: #f0f6ff; font-size: 12px; padding: 4px 8px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.badge.accent { border-color: rgba(117,240,255,0.45); }
.hero-content { padding: 14px 16px 16px; background: linear-gradient(0deg, rgba(23,26,35,0.95), rgba(23,26,35,0.7)); }
.hero-meta { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.hero-button {
  display: inline-block; margin-top: 10px; padding: 8px 12px;
  border-radius: 12px; background: #151923; color: var(--text); font-weight: 700; text-decoration: none;
  border: 1px solid rgba(117,240,255,0.25);
}
.hero-button:hover { border-color: rgba(199,125,255,0.45); }

/* Generic sections/cards */
section { margin-top: 28px; }
.schedule-items { display: flex; gap: 16px; flex-wrap: wrap; }
.card {
  flex: 1 1 260px; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 14px; padding: 14px; box-shadow: var(--shadow-1);
}

/* Link cards */
.link-card { display: inline-block; text-decoration: none; color: inherit; }
.link-card article {
  background: var(--bg-2); padding: 12px 14px; border-radius: 12px; box-shadow: var(--shadow-1);
  border: 1px solid var(--border); margin-right: 10px;
}
.link-card:hover article { transform: translateY(-2px); transition: transform .15s ease; border-color: rgba(199,125,255,0.35); }

/* Footer */
.footer {
  position: fixed; left:0; bottom:0; width:100%; background: rgba(17,19,26,0.85); color:#fff;
  text-align:left; padding: 6px 12px; font-size: 0.9rem; box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
  border-top: 1px solid var(--border);
}
.footer a { color: #dbe7ff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* Accessibility & motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Responsive */
@media (max-width: 900px) {
  .hero-landing { grid-template-columns: 1fr; text-align: center; }
  .sync-glyph { margin: 0 auto; }
}
@media (max-width: 640px) {
  body { margin: 92px 14px 120px; }
  .navbar nav { padding: 10px 12px; }
}

/* --- Enhancements for filters/search --- */
.filter-row input[type="search"]{
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
  background: #12151d;
  color: var(--text);
  min-width: 220px;
}
.chip.active{
  border-color: rgba(117,240,255,0.55);
  box-shadow: 0 0 0 1px rgba(117,240,255,0.25) inset;
}
.btn.small{ padding: 6px 12px; font-size: 0.9rem; }
.sr-only{
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* --- Detail page layout --- */
main.detail { max-width: 900px; margin: 0 auto; }
.detail-hero { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.detail-hero img { width: 100%; max-height: 360px; object-fit: cover; display: block; }
.detail-hero .detail-content { padding: 16px; background: linear-gradient(0deg, rgba(23,26,35,0.96), rgba(23,26,35,0.82)); }
.detail-hero h1 { font-size: 2rem; margin: 6px 0 2px; }
.prose p { margin: 10px 0; }
.prose ul { margin: 8px 0 8px 20px; }
.prose code { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #151923; padding: 2px 6px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.12); }

/* ensure hero-grid fills nicely after dynamic rendering */
#heroGrid { min-height: 80px; }

/* Details coming soon — disabled state */
.hero-button.disabled {
   opacity: 0.45;
   cursor: default;
   pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* Journal modal
/* ------------------------------------------------------------------ */

.j-modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.j-modal-overlay.open {
  opacity: 1; pointer-events: all;
}
.j-modal {
  background: var(--bg-1);
  border: 1px solid rgba(117,240,255,0.25);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,0.8);
  max-width: 640px; width: 100%;
  max-height: 88vh; overflow-y: auto;
  transform: translateY(16px);
  transition: transform .2s ease;
}
.j-modal-overlay.open .j-modal {
  transform: translateY(0);
}
.j-modal img {
  width: 100%; max-height: 240px; object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: block;
}
.j-modal-body {
  padding: 20px 24px 24px;
}
.j-modal-body h2 {
  font-size: 1.3rem; margin: 8px 0 4px; color: var(--text);
}
.j-modal-body .j-modal-meta {
  font-size: .85rem; color: var(--muted); margin-bottom: 12px;
}
.j-modal-body p {
  font-size: .95rem; color: var(--text); line-height: 1.65;
}
.j-modal-badges {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px;
}
.j-modal-close {
  display: block; margin-top: 18px;
  background: transparent; border: 1px solid rgba(255,255,255,0.15);
  color: var(--muted); padding: 8px 16px; border-radius: 10px;
  cursor: pointer; font-size: .9rem; font-family: inherit;
  transition: border-color .15s ease, color .15s ease;
}
.j-modal-close:hover {
  border-color: rgba(199,125,255,0.45); color: var(--text);
}

/* cards clickeables */
.hero { cursor: pointer; }