/* CSS Variables - Clean Light Professional Theme */
:root {
  --background: #fafafa;
  --foreground: #1e293b;
  --card: #ffffff;
  --card-foreground: #1e293b;
  --primary: #0ea5e9;
  --primary-foreground: #ffffff;
  --secondary: #f1f5f9;
  --secondary-foreground: #1e293b;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --accent: #0ea5e9;
  --accent-foreground: #ffffff;
  --border: #e2e8f0;
  --radius: 0.625rem;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

/* Layout */
.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid rgba(226, 232, 240, 0.4);
  background-color: rgba(250, 250, 250, 0.95);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  height: 4rem;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-icon {
  display: flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background-color: var(--primary);
}

.logo-icon svg {
  height: 1.25rem;
  width: 1.25rem;
  color: var(--primary-foreground);
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
}

.nav {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--foreground);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background-color: #0284c7;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--primary);
  color: var(--foreground);
}

.btn-outline:hover {
  background-color: rgba(14, 165, 233, 0.1);
}

.btn-ghost {
  background-color: transparent;
  color: var(--foreground);
}

.btn-ghost:hover {
  background-color: var(--secondary);
}

.btn-icon {
  padding: 0.5rem;
}

.mobile-menu-btn {
  display: flex;
}

/* Section Base */
.section {
  border-bottom: 1px solid rgba(226, 232, 240, 0.4);
}

.section-inner {
  padding: 2rem 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.section-icon {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.625rem;
  background-color: rgba(14, 165, 233, 0.1);
  color: var(--primary);
}

.section-icon svg {
  height: 1.25rem;
  width: 1.25rem;
}

.section-title {
  font-size: 1.5rem;
}

/* Hero Section */
.hero {
  background: linear-gradient(to bottom, rgba(241, 245, 249, 0.5), var(--background));
}

.hero-inner {
  padding: 2rem 0;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}

.badge-primary {
  background-color: rgba(14, 165, 233, 0.1);
  color: var(--primary);
}

.badge-outline {
  border: 1px solid var(--border);
  color: var(--muted-foreground);
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-meta-item svg {
  height: 1rem;
  width: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  padding-top: 1rem;
}

/* Content Card (unified for all sections) */
.content-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background-color: var(--card);
}

.content-text {
  font-size: 1rem;
  color: var(--muted-foreground);
  line-height: 1.875;
  max-width: 65ch;
}

/* Legacy - Objective Section */
.objective-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background-color: var(--card);
}

.objective-text {
  font-size: 1.125rem;
  color: var(--foreground);
  line-height: 1.75;
}

/* Legacy - Description Section */
.description-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background-color: var(--card);
}

.description-text {
  font-size: 1rem;
  color: var(--muted-foreground);
  line-height: 1.875;
  max-width: 65ch;
}

/* Problem / Use Case Section */
.use-case-grid {
  display: grid;
  gap: 1rem;
}

.use-case-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background-color: var(--card);
  transition: all 0.2s;
}

.use-case-card:hover {
  border-color: rgba(14, 165, 233, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.use-case-number {
  display: flex;
  height: 2rem;
  width: 2rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.75rem;
  font-weight: 600;
}

.use-case-content h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.use-case-content p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Solution Section */
.solution-prose {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background-color: var(--card);
  margin-bottom: 2rem;
}

.solution-prose p {
  color: var(--muted-foreground);
  line-height: 1.875;
}

/* Arrow Diagram */
.arrow-diagram {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background-color: var(--card);
  overflow-x: auto;
}

.diagram-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

.diagram-flow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.diagram-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background-color: var(--secondary);
  min-width: 100px;
  text-align: center;
}

.diagram-node svg {
  height: 1.5rem;
  width: 1.5rem;
  color: var(--primary);
}

.diagram-node span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--foreground);
}

.diagram-arrow {
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: bold;
}

/* HLA Section */
.hla-container {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background-color: var(--card);
}

.hla-layers {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hla-layer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hla-layer-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}

.hla-layer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hla-component {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background-color: var(--background);
  font-size: 0.8125rem;
  font-weight: 500;
}

.hla-component svg {
  height: 1rem;
  width: 1rem;
  color: var(--primary);
}

.hla-connector {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0;
  color: var(--muted-foreground);
}

.portfolio-diagram {
  display: block;
  width: 100%;             /* Scales down smoothly on mobile screens */
  max-width: 1400px;        /* Limits the desktop size so it doesn't render too large */
  height: auto;            /* Maintains perfect image proportions without stretching */
  margin: 1.5rem auto 0;   /* Centers the image horizontally and handles your spacing */
}

/* Trade-offs Section */
.tradeoffs-grid {
  display: grid;
  gap: 1rem;
}

.tradeoff-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background-color: var(--card);
}

.tradeoff-icon {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
}

.tradeoff-icon.pro {
  background-color: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.tradeoff-icon.con {
  background-color: rgba(249, 115, 22, 0.1);
  color: #f97316;
}

.tradeoff-icon svg {
  height: 1.25rem;
  width: 1.25rem;
}

.tradeoff-content h4 {
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.tradeoff-content p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Cost Section */
.cost-grid {
  display: grid;
  gap: 1rem;
}

.cost-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background-color: var(--card);
}

.cost-icon {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background-color: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.cost-icon svg {
  height: 1.25rem;
  width: 1.25rem;
}

.cost-content h4 {
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.cost-content p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.cost-savings {
  margin-left: auto;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background-color: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Technical Details Section */
.tech-details-grid {
  display: grid;
  gap: 1.5rem;
}

.tech-detail-category {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background-color: var(--card);
}

.tech-detail-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.tech-detail-icon {
  display: flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background-color: rgba(14, 165, 233, 0.1);
  color: var(--primary);
}

.tech-detail-icon svg {
  height: 1rem;
  width: 1rem;
}

.tech-detail-header h4 {
  font-size: 1rem;
}

.tech-detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tech-detail-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.tech-detail-list li::before {
  content: '';
  display: block;
  margin-top: 0.5rem;
  height: 0.375rem;
  width: 0.375rem;
  flex-shrink: 0;
  border-radius: 9999px;
  background-color: var(--primary);
}

.code-snippet {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background-color: var(--secondary);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

/* Footer */
.footer {
  border-top: 1px solid rgba(226, 232, 240, 0.4);
  background-color: var(--card);
}

.footer-inner {
  padding: 3rem 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo-icon {
  display: flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background-color: var(--primary);
}

.footer-logo-icon svg {
  height: 1rem;
  width: 1rem;
  color: var(--primary-foreground);
}

.footer-logo-text {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--foreground);
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.social-link {
  display: flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: var(--secondary);
  color: var(--muted-foreground);
  transition: all 0.2s;
}

.social-link:hover {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.social-link svg {
  height: 1rem;
  width: 1rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(226, 232, 240, 0.4);
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Responsive - Mobile First */

/* Extra Small (default - below 480px) */
.container {
  padding: 0 1rem;
}

.header-inner {
  height: 3.5rem;
}

.logo-text {
  font-size: 1rem;
}

.hero h1 {
  font-size: 1.5rem;
  line-height: 1.3;
}

.hero-inner {
  padding: 1.5rem 0;
}

.section-inner {
  padding: 1.5rem 0;
}

.section-title {
  font-size: 1.25rem;
}

.section-icon {
  height: 2rem;
  width: 2rem;
}

.section-icon svg {
  height: 1rem;
  width: 1rem;
}

.content-card {
  padding: 1rem;
}

.content-text {
  font-size: 0.875rem;
  line-height: 1.75;
}

.hero-meta {
  gap: 1rem;
  font-size: 0.8125rem;
}

.hero-actions {
  flex-direction: column;
  gap: 0.5rem;
}

.hero-actions .btn {
  width: 100%;
  justify-content: center;
}

.btn {
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
}

.footer-inner {
  padding: 2rem 0;
}

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  font-size: 0.75rem;
}

/* Small (480px and up) */
@media (min-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .hero-actions .btn {
    width: auto;
  }

  .section-title {
    font-size: 1.375rem;
  }

  .content-card {
    padding: 1.25rem;
  }

  .content-text {
    font-size: 0.9375rem;
  }
}

/* Medium (640px and up) */
@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }

  .header-inner {
    height: 4rem;
  }

  .logo-text {
    font-size: 1.125rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-inner {
    padding: 2rem 0;
  }

  .section-inner {
    padding: 2rem 0;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-icon {
    height: 2.5rem;
    width: 2.5rem;
  }

  .section-icon svg {
    height: 1.25rem;
    width: 1.25rem;
  }

  .content-card {
    padding: 1.5rem;
  }

  .content-text {
    font-size: 1rem;
    line-height: 1.875;
  }

  .use-case-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tradeoffs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cost-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    padding: 3rem 0;
  }

  .footer-bottom {
    font-size: 0.875rem;
  }
}

/* Tablet (768px and up) */
@media (min-width: 768px) {
  .nav {
    display: flex;
  }

  .mobile-menu-btn {
    display: none;
  }

  .hero-inner {
    padding: 2.5rem 0;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .section-inner {
    padding: 2.5rem 0;
  }

  .tech-details-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .diagram-flow {
    flex-wrap: nowrap;
  }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
  .hero h1 {
    font-size: 3rem;
  }

  .hla-layers {
    flex-direction: row;
    align-items: stretch;
  }

  .hla-layer {
    flex: 1;
  }

  .hla-connector {
    flex-direction: column;
    padding: 0 0.5rem;
  }
}

/* Large Desktop (1280px and up) */
@media (min-width: 1280px) {
  .hero h1 {
    font-size: 3.5rem;
  }
}
