/* ==========================================================================
   ExcelWorkflow — Global Design System & Tailored Stylesheet
   Graphic Charter: Vert Excel (#107C41) & Vert Émeraude (#10B981 / #34D399)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --aw-font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --aw-font-heading: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* ExcelWorkflow Brand Tokens — Vert Excel & Vert Émeraude */
  --aw-color-excel: #107c41;         /* Microsoft Excel Official Green */
  --aw-color-excel-dark: #0b5a2f;    /* Dark Excel Green */
  --aw-color-excel-deep: #06391d;    /* Deep Forest Excel */
  --aw-color-excel-light: #169253;   /* Bright Excel Green */
  
  --aw-color-emerald: #10b981;       /* Emerald 500 (Tech / IA glow) */
  --aw-color-emerald-light: #34d399; /* Emerald 400 (Vibrant Accent) */
  --aw-color-emerald-lighter: #6ee7b7;/* Emerald 300 */
  --aw-color-emerald-dark: #059669;  /* Emerald 600 */

  --aw-color-primary: #107c41;       /* Vert Excel Primary */
  --aw-color-secondary: #0b5a2f;     /* Vert Excel Dark */
  --aw-color-accent: #10b981;        /* Vert Émeraude Accent */

  --aw-color-text-heading: #0f172a;  /* Slate 900 */
  --aw-color-text-default: #1e293b;  /* Slate 800 */
  --aw-color-text-muted: #64748b;    /* Slate 500 */
  --aw-color-bg-page: #f8fafc;       /* Slate 50 */
  --aw-color-bg-card: #ffffff;
  --aw-color-border: #e2e8f0;
}

.dark {
  --aw-color-excel: #107c41;
  --aw-color-excel-dark: #0b5a2f;
  --aw-color-excel-deep: #06391d;
  --aw-color-excel-light: #22c55e;

  --aw-color-emerald: #10b981;
  --aw-color-emerald-light: #34d399;
  --aw-color-emerald-lighter: #6ee7b7;
  --aw-color-emerald-dark: #059669;

  --aw-color-primary: #107c41;
  --aw-color-secondary: #10b981;
  --aw-color-accent: #34d399;

  --aw-color-text-heading: #f8fafc;  /* Slate 50 */
  --aw-color-text-default: #e2e8f0;  /* Slate 200 */
  --aw-color-text-muted: #94a3b8;    /* Slate 400 */
  --aw-color-bg-page: #020617;       /* Near black Slate 950 */
  --aw-color-bg-card: #0f172a;       /* Slate 900 */
  --aw-color-border: #1e293b;        /* Slate 800 */
}

/* Global Selection */
::selection {
  background-color: #d1fae5;
  color: #084323;
}

.dark ::selection {
  background-color: #0b5a2f;
  color: #a7f3d0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #020617;
}

::-webkit-scrollbar-thumb {
  background: #107c41;
  border-radius: 9999px;
  border: 2px solid #020617;
}

::-webkit-scrollbar-thumb:hover {
  background: #10b981;
}

body {
  font-family: var(--aw-font-sans);
  background-color: var(--aw-color-bg-page);
  color: var(--aw-color-text-default);
  transition: background-color 0.2s ease, color 0.2s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--aw-color-text-heading);
  letter-spacing: -0.025em;
  font-weight: 700;
}

/* Header blur & scroll */
#header {
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

#header.scroll {
  background-color: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(16, 124, 65, 0.25);
}

html:not(.dark) #header.scroll {
  background-color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(16, 124, 65, 0.15);
}

/* ==========================================================================
   Buttons — Excel Green & Emerald Green Dual-Tone
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-weight: 600;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.35;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.8rem 1.75rem;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  position: relative;
  user-select: none;
}

/* Primary Button: Gradient from Vert Excel to Vert Émeraude */
.btn-primary {
  background: linear-gradient(135deg, #107c41 0%, #10b981 100%) !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px 0 rgba(16, 124, 65, 0.4), 0 2px 6px 0 rgba(16, 185, 129, 0.25) !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0b5a2f 0%, #059669 100%) !important;
  border-color: rgba(52, 211, 153, 0.6) !important;
  box-shadow: 0 8px 26px 0 rgba(16, 124, 65, 0.5), 0 3px 10px 0 rgba(16, 185, 129, 0.35) !important;
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px 0 rgba(16, 124, 65, 0.4) !important;
}

/* Secondary Button: Subtle glass with emerald highlight */
.btn-secondary {
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  background-color: rgba(16, 124, 65, 0.08) !important;
  color: #f8fafc !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  border-color: #34d399 !important;
  background-color: rgba(16, 185, 129, 0.18) !important;
  color: #34d399 !important;
  box-shadow: 0 4px 16px -2px rgba(16, 185, 129, 0.25);
  transform: translateY(-1px);
}

html:not(.dark) .btn-secondary {
  border-color: #cbd5e1 !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

html:not(.dark) .btn-secondary:hover {
  border-color: #107c41 !important;
  background-color: #f0fdf4 !important;
  color: #107c41 !important;
  box-shadow: 0 4px 12px rgba(16, 124, 65, 0.15);
}

/* ==========================================================================
   Cards & Glassmorphism with Dual Green Hover
   ========================================================================== */
.card-glass {
  background-color: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(30, 41, 59, 0.85);
  border-radius: 1rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card-glass:hover {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 14px 34px -8px rgba(16, 124, 65, 0.25), 0 0 18px -3px rgba(16, 185, 129, 0.15);
  transform: translateY(-3px);
}

html:not(.dark) .card-glass {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.05);
}

html:not(.dark) .card-glass:hover {
  border-color: #107c41;
  box-shadow: 0 14px 28px -6px rgba(16, 124, 65, 0.16), 0 0 12px -2px rgba(16, 185, 129, 0.1);
  transform: translateY(-3px);
}

/* ==========================================================================
   Excel & Emerald Badges & Accents
   ========================================================================== */
.badge-excel-emerald {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(16, 124, 65, 0.15), rgba(16, 185, 129, 0.12));
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

html:not(.dark) .badge-excel-emerald {
  background: linear-gradient(135deg, rgba(16, 124, 65, 0.1), rgba(16, 185, 129, 0.08));
  border-color: rgba(16, 124, 65, 0.25);
  color: #0b5a2f;
}

/* Text Gradient Signature */
.text-gradient-excel {
  background: linear-gradient(135deg, #107c41 0%, #10b981 60%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dark .text-gradient-excel {
  background: linear-gradient(135deg, #22c55e 0%, #10b981 40%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glow effects */
.glow-excel {
  box-shadow: 0 0 25px rgba(16, 124, 65, 0.35);
}

.glow-emerald {
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.35);
}

/* Hamburger toggle */
[data-aw-toggle-menu] svg {
  transition: transform 0.2s ease;
}

[data-aw-toggle-menu].expanded #bar1 {
  transform: rotate(-45deg) translate(-5px, 6px);
}

[data-aw-toggle-menu].expanded #bar2 {
  opacity: 0;
}

[data-aw-toggle-menu].expanded #bar3 {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Form controls */
.form-input {
  width: 100%;
  border-radius: 0.5rem;
  background-color: rgba(15, 23, 42, 0.8);
  border: 1px solid #334155;
  color: #f8fafc;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

html:not(.dark) .form-input {
  background-color: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.form-input:focus {
  border-color: #107c41;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.form-checkbox {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 0.25rem;
  accent-color: #107c41;
  cursor: pointer;
}

/* Prose Typography for Blog & Content */
.prose {
  color: var(--aw-color-text-default);
  line-height: 1.8;
  font-size: 1.05rem;
}

.prose h2 {
  font-size: 1.85rem;
  margin-top: 2.25rem;
  margin-bottom: 1rem;
  color: var(--aw-color-text-heading);
  border-bottom: 1px solid rgba(16, 124, 65, 0.3);
  padding-bottom: 0.5rem;
}

.prose h3 {
  font-size: 1.4rem;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--aw-color-text-heading);
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose ul, .prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose pre {
  background-color: #0a1612;
  border: 1px solid rgba(16, 124, 65, 0.4);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  color: #34d399;
  margin-bottom: 1.5rem;
}

.prose code {
  background-color: rgba(16, 124, 65, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

html:not(.dark) .prose code {
  background-color: #f0fdf4;
  color: #0b5a2f;
  border-color: #bbf7d0;
}

.prose pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  border: none;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.prose th, .prose td {
  border: 1px solid #334155;
  padding: 0.75rem 1rem;
  text-align: left;
}

.prose th {
  background-color: rgba(16, 124, 65, 0.15);
  color: #34d399;
  font-weight: 600;
}

html:not(.dark) .prose th {
  background-color: #f0fdf4;
  color: #0b5a2f;
}

.prose blockquote {
  border-left: 4px solid #107c41;
  background: rgba(16, 124, 65, 0.05);
  padding: 0.75rem 1rem;
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: var(--aw-color-text-muted);
  margin-bottom: 1.5rem;
}

.prose img {
  border-radius: 0.75rem;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
}

/* ==========================================================================
   THE INFINITE DATA SKY — Hero Cinematic Astronomy Viewport
   ========================================================================== */

.infinite-data-sky-viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #020617;
  contain: layout paint;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .infinite-data-sky-viewport * {
    animation: none !important;
    transition: none !important;
  }
}

