/* Import Tailwind CSS */
@import 'https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css';

/* IoT Theme Colors */
:root {
  --primary-color: #3b82f6;  /* blue-500 */
  --secondary-color: #4f46e5; /* indigo-600 */
  --accent-color: #8b5cf6;    /* violet-500 */
  --background-light: #eef2ff; /* indigo-50 */
  --text-dark: #1e293b;       /* slate-800 */
  --text-light: #94a3b8;      /* slate-400 */
}

/* Custom styles for coming soon page */
.countdown-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

/* Animation for the gradient text */
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.gradient-text {
  background-size: 200% auto;
  animation: gradient-shift 5s ease infinite;
}

/* Shine effect on progress bar */
.progress-bar-shine {
  position: relative;
  overflow: hidden;
}

.progress-bar-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
  animation: shine 2s infinite;
}

@keyframes shine {
  100% {
    left: 150%;
  }
}

/* Floating animation removed */

/* Circuit board pattern background */
.bg-circuit-pattern {
  background-color: var(--background-light);
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%234f46e5' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
}

/* Glass morphism effect */
.glass {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Blob animation */
@keyframes blob {
  0% { transform: translate(0px, 0px) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0px, 0px) scale(1); }
}

.animate-blob {
  animation: blob 7s infinite;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .countdown-container {
    flex-wrap: wrap;
  }
}

/* Focus styles for better accessibility */
.focus-visible:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ==========================================
   Article Content Prose Styles
   ========================================== */

/* Base prose container */
.prose {
  color: #374151;
  max-width: 65ch;
  font-size: 1.125rem;
  line-height: 1.8;
}

.prose-lg {
  font-size: 1.125rem;
  line-height: 1.8;
}

/* Headings */
.prose h1 {
  color: #111827;
  font-weight: 800;
  font-size: 2.25em;
  margin-top: 0;
  margin-bottom: 0.8888889em;
  line-height: 1.1111111;
  letter-spacing: -0.02em;
}

.prose h2 {
  color: #111827;
  font-weight: 700;
  font-size: 1.5em;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3333333;
  letter-spacing: -0.01em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid #10b981;
  position: relative;
}

.prose h2::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 2px;
}

.prose h3 {
  color: #111827;
  font-weight: 600;
  font-size: 1.25em;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.6;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.prose h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1em;
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  border-radius: 2px;
  flex-shrink: 0;
}

.prose h4 {
  color: #111827;
  font-weight: 600;
  font-size: 1.125em;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.5;
}

.prose h5 {
  color: #374151;
  font-weight: 600;
  font-size: 1em;
  margin-top: 1.25em;
  margin-bottom: 0.5em;
  line-height: 1.5;
}

.prose h6 {
  color: #4b5563;
  font-weight: 600;
  font-size: 0.875em;
  margin-top: 1.25em;
  margin-bottom: 0.5em;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Paragraphs */
.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose p:first-child {
  margin-top: 0;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* Lead paragraph (first paragraph) */
.prose > p:first-of-type {
  font-size: 1.125em;
  color: #4b5563;
}

/* Links */
.prose a {
  color: #059669;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}

.prose a:hover {
  color: #047857;
  border-bottom-color: #10b981;
}

.prose a:focus {
  outline: 2px solid #10b981;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Bold and Strong */
.prose strong {
  color: #111827;
  font-weight: 600;
}

/* Emphasis */
.prose em {
  font-style: italic;
  color: #374151;
}

/* Lists */
.prose ul {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.625em;
  list-style-type: none;
}

.prose ul > li {
  position: relative;
  padding-left: 0.375em;
  margin-bottom: 0.625em;
}

.prose ul > li::before {
  content: '';
  position: absolute;
  left: -1.25em;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 50%;
}

.prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.625em;
  list-style-type: none;
  counter-reset: list-counter;
}

.prose ol > li {
  position: relative;
  padding-left: 0.5em;
  margin-bottom: 0.625em;
  counter-increment: list-counter;
}

.prose ol > li::before {
  content: counter(list-counter) ".";
  position: absolute;
  left: -1.5em;
  font-weight: 600;
  color: #10b981;
}

/* Nested lists */
.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
}

.prose ul ul > li::before {
  width: 4px;
  height: 4px;
  background: #9ca3af;
  top: 0.7em;
}

/* Blockquotes */
.prose blockquote {
  margin-top: 1.6em;
  margin-bottom: 1.6em;
  padding-left: 1.5em;
  border-left: 4px solid #10b981;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  padding: 1.25em 1.5em;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #374151;
  position: relative;
}

.prose blockquote::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 15px;
  font-size: 4rem;
  color: #10b981;
  opacity: 0.3;
  font-family: Georgia, serif;
  line-height: 1;
}

.prose blockquote p {
  margin: 0;
}

.prose blockquote cite {
  display: block;
  margin-top: 0.75em;
  font-style: normal;
  font-weight: 500;
  color: #059669;
  font-size: 0.875em;
}

.prose blockquote cite::before {
  content: '— ';
}

/* Code - Inline */
.prose code {
  font-family: 'Fira Code', 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
  font-size: 0.875em;
  color: #059669;
  background-color: #f0fdf4;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  border: 1px solid #d1fae5;
  font-weight: 500;
}

/* Code - Block */
.prose pre {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #e2e8f0;
  padding: 1.25em 1.5em;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.875em;
  line-height: 1.7;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  position: relative;
}

.prose pre::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 16px;
  display: flex;
  gap: 6px;
  width: 50px;
  height: 12px;
  background: 
    radial-gradient(circle at 6px 6px, #ff5f56 5px, transparent 6px),
    radial-gradient(circle at 22px 6px, #ffbd2e 5px, transparent 6px),
    radial-gradient(circle at 38px 6px, #27c93f 5px, transparent 6px);
}

.prose pre code {
  background: transparent;
  padding: 0;
  border: none;
  color: inherit;
  font-size: inherit;
  border-radius: 0;
}

/* Images */
.prose img {
  margin-top: 2em;
  margin-bottom: 2em;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.prose img:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 30px -5px rgba(0, 0, 0, 0.15), 0 12px 12px -5px rgba(0, 0, 0, 0.06);
}

/* Figure and Figcaption */
.prose figure {
  margin-top: 2em;
  margin-bottom: 2em;
}

.prose figure img {
  margin-top: 0;
  margin-bottom: 0;
}

.prose figcaption {
  color: #6b7280;
  font-size: 0.875em;
  line-height: 1.4285714;
  margin-top: 0.8571429em;
  text-align: center;
  font-style: italic;
}

/* Horizontal Rule */
.prose hr {
  border: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #10b981 50%, transparent 100%);
  margin: 3em 0;
  position: relative;
}

.prose hr::before {
  content: '◆';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: white;
  color: #10b981;
  padding: 0 0.5em;
  font-size: 0.875em;
}

/* Tables */
.prose table {
  width: 100%;
  margin-top: 2em;
  margin-bottom: 2em;
  border-collapse: collapse;
  font-size: 0.875em;
  line-height: 1.7142857;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.prose thead {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.prose thead th {
  font-weight: 600;
  padding: 0.75em 1em;
  text-align: left;
  vertical-align: bottom;
  border-bottom: 2px solid #059669;
}

.prose tbody tr {
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.2s ease;
}

.prose tbody tr:hover {
  background-color: #f0fdf4;
}

.prose tbody tr:last-child {
  border-bottom: none;
}

.prose tbody td {
  padding: 0.75em 1em;
  vertical-align: top;
}

.prose tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

.prose tbody tr:nth-child(even):hover {
  background-color: #f0fdf4;
}

/* Definition Lists */
.prose dl {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose dt {
  color: #111827;
  font-weight: 600;
  margin-top: 1.25em;
}

.prose dd {
  margin-left: 1.625em;
  margin-top: 0.5em;
  color: #4b5563;
}

/* Abbreviations */
.prose abbr[title] {
  text-decoration: underline dotted;
  text-decoration-color: #10b981;
  cursor: help;
}

/* Mark/Highlight */
.prose mark {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 0.1em 0.3em;
  border-radius: 4px;
  color: #92400e;
}

/* Keyboard Input */
.prose kbd {
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.875em;
  padding: 0.2em 0.4em;
  background: linear-gradient(180deg, #f9fafb 0%, #e5e7eb 100%);
  border: 1px solid #d1d5db;
  border-radius: 4px;
  box-shadow: 0 2px 0 #9ca3af;
  color: #374151;
}

/* Subscript and Superscript */
.prose sub,
.prose sup {
  font-size: 0.75em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

.prose sup {
  top: -0.5em;
}

.prose sub {
  bottom: -0.25em;
}

/* Video and iframe */
.prose video,
.prose iframe {
  margin-top: 2em;
  margin-bottom: 2em;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  max-width: 100%;
}

/* Details/Summary (Accordion) */
.prose details {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1em;
  background: #f9fafb;
}

.prose details[open] {
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.prose summary {
  font-weight: 600;
  color: #059669;
  cursor: pointer;
  padding: 0.5em;
  margin: -1em;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.5em;
  transition: color 0.2s ease;
}

.prose summary:hover {
  color: #047857;
}

.prose details[open] summary {
  margin-bottom: 1em;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1em;
}

/* Note/Tip/Warning boxes (using div with classes) */
.prose .note,
.prose .tip,
.prose .warning,
.prose .info {
  padding: 1em 1.25em;
  border-radius: 8px;
  margin: 1.5em 0;
  position: relative;
  padding-left: 3em;
}

.prose .note::before,
.prose .tip::before,
.prose .warning::before,
.prose .info::before {
  position: absolute;
  left: 1em;
  top: 1em;
  font-size: 1.25em;
}

.prose .note {
  background: #f0f9ff;
  border-left: 4px solid #3b82f6;
  color: #1e40af;
}

.prose .note::before {
  content: '📝';
}

.prose .tip {
  background: #f0fdf4;
  border-left: 4px solid #10b981;
  color: #047857;
}

.prose .tip::before {
  content: '💡';
}

.prose .warning {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

.prose .warning::before {
  content: '⚠️';
}

.prose .info {
  background: #f5f3ff;
  border-left: 4px solid #8b5cf6;
  color: #5b21b6;
}

.prose .info::before {
  content: 'ℹ️';
}

/* Green theme override */
.prose-green a {
  color: #059669;
}

.prose-green a:hover {
  color: #047857;
}

/* Spacing adjustments between elements */
.prose > *:first-child {
  margin-top: 0 !important;
}

.prose > *:last-child {
  margin-bottom: 0 !important;
}

/* Step-by-step instructions styling */
.prose p > strong:first-child {
  display: inline-block;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 0.1em 0.6em;
  border-radius: 4px;
  font-size: 0.9em;
  margin-right: 0.5em;
}

/* Smooth scroll for anchor links */
.prose :target {
  scroll-margin-top: 2rem;
}

/* Selection styling */
.prose ::selection {
  background: rgba(16, 185, 129, 0.3);
  color: #111827;
}

/* Print styles */
@media print {
  .prose {
    font-size: 12pt;
    line-height: 1.5;
    color: black;
  }
  
  .prose h2::before,
  .prose h3::before {
    background: black !important;
  }
  
  .prose a {
    color: black;
    text-decoration: underline;
  }
  
  .prose pre {
    background: #f5f5f5;
    color: black;
    border: 1px solid #ccc;
  }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .prose {
    font-size: 1rem;
    line-height: 1.7;
  }
  
  .prose h2 {
    font-size: 1.375em;
  }
  
  .prose h3 {
    font-size: 1.125em;
  }
  
  .prose pre {
    padding: 1em;
    font-size: 0.8125em;
    border-radius: 8px;
  }
  
  .prose blockquote {
    padding: 1em;
  }
  
  .prose table {
    font-size: 0.8125em;
  }
} 