/* ═══ RESET & BASE ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #6366F1;
  --blue-dark: #4338CA;
  --orange: #F59E0B;
  --orange-dark: #D97706;
  --green: #06B6D4;
  --red: #F43F5E;
  --accent: #8B5CF6;
  --teal: #14B8A6;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-500: #64748B;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 6px 16px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ═══ HERO ═══ */
.hero {
  background: linear-gradient(135deg, #1E1B4B 0%, #0F172A 40%, #134E4A 100%);
  color: white;
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(99,102,241,.2) 0%, transparent 70%),
              radial-gradient(ellipse at 70% 50%, rgba(20,184,166,.15) 0%, transparent 70%);
}
.hero-inner { position: relative; max-width: 1000px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  padding: .25rem .9rem;
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  backdrop-filter: blur(4px);
}
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: .6rem;
  background: linear-gradient(135deg, #fff 40%, #A5B4FC 70%, #5EEAD4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub { color: rgba(255,255,255,.7); font-size: 1.05rem; margin-bottom: 2rem; }
.hero-sub strong { color: var(--orange); }

/* ── KPI Row ── */
.kpi-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.kpi {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  min-width: 150px;
  backdrop-filter: blur(8px);
  transition: transform .2s;
}
.kpi:hover { transform: translateY(-2px); }
.kpi.accent { border-color: var(--orange); background: rgba(245,158,11,.1); }
.kpi-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
}
.kpi.accent .kpi-value { color: var(--orange); }
.kpi-label {
  display: block;
  font-size: .78rem;
  color: rgba(255,255,255,.6);
  margin-top: .25rem;
}

/* ═══ TABS ═══ */
.tabs {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  gap: .25rem;
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 0 1rem;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: none;
  background: none;
  padding: .85rem 1.1rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all .2s;
  font-family: inherit;
}
.tab:hover { color: var(--gray-800); }
.tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  font-weight: 600;
}

/* ═══ SECTIONS ═══ */
main { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
.section { display: none; animation: fadeIn .3s ease; }
.section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.section-header { margin-bottom: 1.5rem; }
.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}
.section-header p { color: var(--gray-500); font-size: .95rem; }

/* ═══ GRID & CARDS ═══ */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.card {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
  transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card.full { margin-bottom: 1.25rem; }
.card h3 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--gray-100);
}

.chart-wrap { position: relative; width: 100%; min-height: 300px; }
.chart-tall { min-height: 420px; }
.chart-xtall { min-height: 580px; }

/* ═══ TABLE ═══ */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
th {
  text-align: left;
  padding: .7rem .8rem;
  background: var(--gray-50);
  color: var(--gray-500);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-bottom: 2px solid var(--gray-200);
}
td {
  padding: .65rem .8rem;
  border-bottom: 1px solid var(--gray-100);
}
tr:hover td { background: var(--gray-50); }
.up { color: var(--green); font-weight: 600; }
.down { color: var(--red); font-weight: 600; }

/* ═══ CALLOUT ═══ */
.callout {
  background: linear-gradient(135deg, #EEF2FF, #F0FDFA);
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: .92rem;
  line-height: 1.65;
}

/* ═══ NEW ORGS LIST ═══ */
.new-orgs-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: .5rem;
}
.new-orgs-grid::-webkit-scrollbar { width: 4px; }
.new-orgs-grid::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 2px; }
.org-tag {
  display: inline-block;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: .3rem .6rem;
  font-size: .78rem;
  color: var(--gray-700);
  transition: all .15s;
}
.org-tag:hover {
  background: #DBEAFE;
  border-color: var(--blue);
  color: var(--blue-dark);
}

/* ═══ LINKEDIN SECTION ═══ */
.linkedin-cards { display: flex; flex-direction: column; gap: 1.25rem; }
.linkedin-card { position: relative; }
.linkedin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--gray-100);
}
.linkedin-badge {
  display: inline-block;
  background: var(--blue);
  color: white;
  border-radius: 6px;
  padding: .2rem .7rem;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.linkedin-badge.short { background: var(--green); }
.linkedin-badge.carrousel { background: var(--orange-dark); }
.copy-btn {
  border: 1px solid var(--gray-300);
  background: white;
  padding: .4rem .9rem;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--gray-700);
  transition: all .15s;
  font-family: inherit;
}
.copy-btn:hover {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.linkedin-content {
  white-space: pre-wrap;
  font-size: .88rem;
  line-height: 1.7;
  color: var(--gray-700);
  background: var(--gray-50);
  border-radius: 8px;
  padding: 1.25rem;
  border: 1px solid var(--gray-200);
  max-height: 400px;
  overflow-y: auto;
}

/* ═══ TOAST ═══ */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--gray-900);
  color: white;
  padding: .6rem 1.5rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 500;
  opacity: 0;
  transition: all .3s ease;
  z-index: 1000;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══ FOOTER ═══ */
footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--gray-500);
  font-size: .82rem;
  border-top: 1px solid var(--gray-200);
  margin-top: 3rem;
}
footer a { color: var(--blue); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.footer-credit {
  margin-top: .5rem;
  font-size: .85rem;
  color: var(--gray-700);
}

/* ═══ AUTHOR CARD ═══ */
.author-card {
  max-width: 600px;
  margin: 0 auto 1.25rem;
  text-align: center;
  padding: 2rem 1.5rem;
}
.author-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gray-200);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  margin-bottom: 1rem;
  transition: transform .2s, box-shadow .2s;
}
.author-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
}
.author-name-link {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: .35rem;
  text-decoration: none;
}
.author-name-link:hover {
  color: var(--blue);
}
.author-headline {
  font-size: .9rem;
  color: var(--gray-500);
  line-height: 1.5;
  margin-bottom: .75rem;
}
.linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #0A66C2;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  padding: .45rem 1rem;
  border: 2px solid #0A66C2;
  border-radius: 20px;
  transition: all .2s;
}
.linkedin-link img {
  filter: brightness(0) saturate(100%) invert(26%) sepia(89%) saturate(1583%) hue-rotate(190deg) brightness(96%) contrast(101%);
}
.linkedin-link:hover {
  background: #0A66C2;
  color: white;
}
.linkedin-link:hover img {
  filter: brightness(0) invert(1);
}

/* ═══ CONTACT FORM ═══ */
.contact-card { max-width: 600px; margin: 0 auto; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: .4rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: .7rem .9rem;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: .92rem;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--gray-50);
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
  background: white;
}
.form-group textarea { resize: vertical; min-height: 120px; }
.submit-btn {
  width: 100%;
  padding: .8rem;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.submit-btn:hover { background: var(--blue-dark); }
.submit-btn:active { transform: scale(.98); }
.submit-btn:disabled { background: var(--gray-300); cursor: not-allowed; }
.form-success {
  text-align: center;
  padding: 2rem 1rem;
}
.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #D1FAE5;
  color: var(--green);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.form-success h3 { color: var(--green); margin-bottom: .5rem; }
.form-success p { color: var(--gray-500); }

/* ═══ DARK MODE TOGGLE ═══ */
.lang-toggle {
  position: absolute;
  top: 1rem;
  right: 4rem;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: .85rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: all .3s;
  backdrop-filter: blur(4px);
  z-index: 10;
  letter-spacing: .5px;
}
.lang-toggle:hover {
  background: rgba(255,255,255,.25);
  transform: scale(1.05);
}

.dark-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all .3s;
  backdrop-filter: blur(4px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dark-toggle:hover {
  background: rgba(255,255,255,.2);
  transform: scale(1.1);
}

/* ═══ DARK MODE ═══ */
body.dark {
  --gray-50: #0F172A;
  --gray-100: #1E293B;
  --gray-200: #334155;
  --gray-300: #475569;
  --gray-500: #94A3B8;
  --gray-700: #CBD5E1;
  --gray-800: #E2E8F0;
  --gray-900: #F8FAFC;
  --shadow: 0 1px 3px rgba(0,0,0,.3), 0 6px 16px rgba(0,0,0,.2);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.4);
  background: #0F172A;
  color: #E2E8F0;
}
body.dark .card {
  background: #1E293B;
  border-color: #334155;
}
body.dark .tabs {
  background: #1E293B;
  border-bottom-color: #334155;
}
body.dark .tab { color: #94A3B8; }
body.dark .tab.active { color: var(--blue); }
body.dark table th { background: #1E293B; color: #94A3B8; border-bottom-color: #334155; }
body.dark table td { border-bottom-color: #334155; }
body.dark tr:hover td { background: #334155; }
body.dark .callout { background: linear-gradient(135deg, #1E1B4B33, #134E4A33); }
body.dark .org-tag { background: #334155; border-color: #475569; color: #CBD5E1; }
body.dark .org-tag:hover { background: #4338CA33; border-color: var(--blue); color: var(--blue); }
body.dark .form-group input,
body.dark .form-group textarea { background: #334155; border-color: #475569; color: #E2E8F0; }
body.dark .submit-btn { background: var(--blue); }
body.dark footer { border-top-color: #334155; }
body.dark .org-search { background: #334155; border-color: #475569; color: #E2E8F0; }
body.dark .carousel-slide { background: #1E293B; border-color: #334155; }

/* ═══ SCROLL ANIMATIONS ═══ */
.card, .callout, .carousel-container {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.card.visible, .callout.visible, .carousel-container.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══ INSIGHTS CAROUSEL ═══ */
.carousel-container {
  margin: 1.25rem 0;
  position: relative;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.carousel-slide {
  min-width: 100%;
  padding: 2rem 2.5rem;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
  text-align: center;
  box-sizing: border-box;
}
.insight-icon {
  font-size: 2.5rem;
  margin-bottom: .75rem;
}
.insight-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: .5rem;
}
.insight-text {
  font-size: .95rem;
  color: var(--gray-500);
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
}
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 1rem;
}
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray-300);
  border: none;
  cursor: pointer;
  transition: all .3s;
  padding: 0;
}
.carousel-dot.active {
  background: var(--blue);
  transform: scale(1.3);
}

/* ═══ ORG SEARCH ═══ */
.org-search {
  width: 100%;
  padding: .6rem .9rem;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: .88rem;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--gray-50);
  margin-bottom: .75rem;
  transition: border-color .2s, box-shadow .2s;
}
.org-search:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

/* ═══ DATA DICTIONARY ═══ */
.dict-intro {
  font-size: .95rem;
  color: var(--gray-700);
  line-height: 1.7;
}
.dict-grid {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.dict-item {
  padding: 1rem 1.25rem;
  background: var(--gray-50);
  border-radius: 10px;
  border-left: 3px solid var(--blue);
  transition: all .2s;
}
.dict-item:hover {
  border-left-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.dict-label {
  font-weight: 700;
  font-size: .92rem;
  color: var(--gray-900);
  margin-bottom: .3rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.dict-desc {
  font-size: .88rem;
  color: var(--gray-500);
  line-height: 1.6;
}
.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.prod { background: var(--teal); }
.status-dot.dev { background: var(--orange); }
.status-dot.na { background: var(--gray-300); }

body.dark .dict-item { background: #334155; }
body.dark .dict-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,.2); }

/* ═══ FOOTER UPDATED ═══ */
.footer-updated {
  margin-top: .3rem;
  font-size: .78rem;
  color: var(--gray-500);
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .hero { padding: 2rem 1rem 1.5rem; }
  .kpi-row { gap: .6rem; }
  .kpi { min-width: 130px; padding: .75rem 1rem; }
  .kpi-value { font-size: 1.5rem; }
  main { padding: 1rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .chart-wrap { min-height: 260px; }
  .chart-tall { min-height: 350px; }
  .chart-xtall { min-height: 450px; }
}
