/* ===================================================
   AI in PM — Style Sheet
   =================================================== */

:root {
  --brand-primary: #4F46E5;
  --brand-secondary: #06B6D4;
  --surface-dark: #0F172A;
  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --text-on-dark: #F8FAFC;
  --border: #CBD5E1;
  --border-focus: #4F46E5;
  --radius-md: 12px;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #F1F5F9;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ─── HEADER ─────────────────────────────────────── */

.site-header {
  background: linear-gradient(135deg, var(--surface-dark) 0%, #1E1B4B 60%, #0C1445 100%);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 20%, rgba(79,70,229,.35) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(6,182,212,.20) 0%, transparent 55%);
  pointer-events: none;
}

.header-inner {
  position: relative;
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px 24px 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.header-left { flex: 1; min-width: 0; }

.header-right { flex-shrink: 0; }

.header-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-secondary);
  margin-bottom: 8px;
}

.header-eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-secondary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(1.3); }
}

.site-header h1 {
  font-size: clamp(22px, 3.2vw, 38px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
}

.site-header h1 span {
  background: linear-gradient(90deg, #818CF8, #06B6D4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── LINKEDIN ───────────────────────────────────── */

.linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 50px;
  background: #0A66C2;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}

.linkedin-link:hover { background: #004182; transform: translateY(-1px); }
.linkedin-link--footer { font-size: 13px; }

/* ─── CONTROLS BAR ───────────────────────────────── */

.controls-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.controls-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-wrap {
  position: relative;
  flex: 0 0 260px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 8px 16px 8px 40px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-primary);
  background: #F8FAFC;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.search-input:focus {
  border-color: var(--border-focus);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

.search-input::placeholder { color: var(--text-muted); }

.tag-filters {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tag-filters::-webkit-scrollbar { display: none; }

.tag-btn {
  padding: 5px 12px;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.tag-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: rgba(79,70,229,.06);
}

.tag-btn.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}

/* ─── MAIN ───────────────────────────────────────── */

.main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

/* ─── EDITORIAL LAYOUT ───────────────────────────── */

.editorial-layout {
  display: grid;
  grid-template-columns: 1fr clamp(300px, 25%, 450px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
}

/* Card link overlay — title <a> covers the whole card; badge sits above it */

.lead-card,
.stack-item,
.list-row { position: relative; }

.card-link {
  text-decoration: none;
  color: inherit;
}

.card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  cursor: pointer;
}

/* Lead card — left panel */

.lead-card {
  padding: 32px 40px 32px 32px;
  border-right: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fff;
  transition: background var(--transition);
}

.lead-card:hover { background: #F8FAFC; }

.lead-title {
  font-size: clamp(26px, 2vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--text-primary);
}

.lead-summary-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lead-summary {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
  font-style: italic;
}

/* Secondary stack — right panel */

.secondary-stack {
  display: flex;
  flex-direction: column;
}

.stack-item {
  flex: 1;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: background var(--transition);
}

.stack-item:last-child { border-bottom: none; }
.stack-item:hover { background: #FAFBFC; }

.stack-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  transition: color var(--transition);
}

.stack-item:hover .stack-title { color: var(--brand-primary); }

.stack-summary {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Shared label + meta */

.article-category {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.article-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: #F1F5F9;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px 2px 6px;
  white-space: nowrap;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  align-self: flex-start;
  vertical-align: middle;
  position: relative;
  z-index: 1;
  transition: border-color var(--transition), color var(--transition);
}

.source-badge:hover {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

/* ─── LIST ROWS ──────────────────────────────────── */

.articles-list {
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow: hidden;
}

/* Full border-radius when shown standalone (search/filter mode) */
.articles-list--full {
  border-top: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.list-row {
  display: grid;
  grid-template-columns: clamp(130px, 10%, 200px) 1fr auto;
  align-items: start;
  gap: 24px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
}

.list-row:last-child { border-bottom: none; }
.list-row:hover { background: #F8FAFC; }
.list-row:hover .row-title { color: var(--brand-primary); }

.row-category {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
}

.row-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.row-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  transition: color var(--transition);
}

.row-summary {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row-meta {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: right;
}

/* ─── EMPTY STATE ────────────────────────────────── */

.empty-state {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}

.empty-state svg { margin-bottom: 12px; opacity: .35; }
.empty-state p { font-size: 15px; }

/* ─── FOOTER ─────────────────────────────────────── */

.site-footer {
  background: var(--surface-dark);
  color: #475569;
  padding: 28px 24px;
  font-size: 13px;
}

.site-footer a { color: var(--brand-secondary); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.footer-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-legal {
  max-width: 1600px;
  margin: 16px auto 0;
  padding-top: 16px;
  border-top: 1px solid #1E293B;
  font-size: 11px;
  color: #334155;
  line-height: 1.7;
}

/* ─── LARGE SCREENS (1600px+) ────────────────────── */

@media (min-width: 1600px) {
  .lead-card { padding: 48px 56px 48px 48px; gap: 18px; }
  .lead-summary { font-size: 16px; }
  .stack-item { padding: 24px 28px; gap: 10px; }
  .stack-title { font-size: 15px; }
  .list-row { padding: 16px 32px; gap: 32px; }
  .row-title { font-size: 15px; }
  .main { padding: 36px 32px 80px; }
}

/* ─── RESPONSIVE ─────────────────────────────────── */

@media (max-width: 900px) {
  .editorial-layout { grid-template-columns: 1fr; }
  .lead-card { border-right: none; border-bottom: 1px solid var(--border); padding: 28px 24px; }
  .lead-title { font-size: 22px; }
  .secondary-stack { flex-direction: row; flex-wrap: wrap; }
  .stack-item { flex: 1 1 48%; border-bottom: none; border-top: 1px solid var(--border); }
}

@media (max-width: 640px) {
  .header-inner { padding: 16px; }
  .controls-inner { padding: 8px 16px; }
  .search-wrap { flex: 1; }
  .main { padding: 20px 16px 48px; }
  .lead-card { padding: 24px 16px; }
  .list-row { grid-template-columns: 1fr; gap: 6px; padding: 14px 16px; }
  .row-category { margin-bottom: -2px; }
  .row-meta { text-align: left; }
  .stack-item { flex: 1 1 100%; }
}

/* Disable animations for reduced motion / headless */
@media (prefers-reduced-motion: reduce) {
  .header-eyebrow .dot { animation: none; }
}
