* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", monospace;
}

body {
  margin: 0;
  background: #0f172a;
  color: #e5e7eb;
  line-height: 1.6;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px;
}

header {
  margin-bottom: 48px;
  position: relative;
  padding-top: 50px;
}

/* Navigation styles - Badge design */
.header-nav {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 100;
}

/* Back link on the left for blog pages */
.header-nav-left {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
}

.header-nav-left .nav-link {
  color: #94a3b8;
  background: transparent;
  font-size: 0.9em;
  font-weight: 400;
  padding: 8px 12px;
  display: inline-block;
  border-radius: 6px;
  transition: all 0.3s ease;
  box-shadow: none;
}

.header-nav-left .nav-link:hover {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  box-shadow: none;
  transform: translateX(-2px);
}

.nav-item {
  position: relative;
  display: inline-block;
}

.nav-link {
  color: #e5e7eb;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  font-size: 0.9em;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 16px;
  display: inline-block;
  border-radius: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.nav-link:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
  transform: translateY(-1px);
}

/* Dropdown styles */
.dropdown-content {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  min-width: 320px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

/* Näkymätön "silta" jotta hover pysyy */
.dropdown-content::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-content a {
  color: #e5e7eb;
  padding: 12px 16px;
  display: block;
  font-size: 0.9em;
  line-height: 1.5;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.dropdown-content a:hover {
  background: #334155;
  color: #22c55e;
  text-decoration: none;
  transform: translateX(4px);
}

h1 {
  margin: 0 0 12px 0;
  font-size: 2.4em;
  color: #22c55e;
}

.subtitle {
  font-size: 1.1em;
  color: #94a3b8;
}

section {
  margin-bottom: 40px;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.4em;
  color: #e5e7eb;
}

p {
  margin: 12px 0;
}

ul {
  margin: 12px 0 12px 20px;
}

li {
  margin: 6px 0;
}

.note {
  color: #94a3b8;
  font-size: 0.95em;
}

a {
  color: #38bdf8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  font-size: 0.9em;
  color: #64748b;
}

/* Mobile responsive */
@media (max-width: 640px) {
  /* Header navigation mobiilissa */
  header {
    padding-top: 55px;
  }
  
  .header-nav {
    top: 0;
    right: auto;
    left: 0;
  }
  
  .nav-link {
    font-size: 0.85em;
    padding: 7px 14px;
  }
  
  /* Dropdown mobiilissa */
  .dropdown-content {
    right: auto;
    left: 0;
    min-width: 92vw;
    max-width: 360px;
    font-size: 0.85em;
  }
  
  .dropdown-content a {
    padding: 14px 16px;
    line-height: 1.6;
  }
  
  /* Otsikot pienemmiksi */
  h1 {
    font-size: 1.8em;
  }
  
  .subtitle {
    font-size: 1em;
  }
  
  /* Footer kahdelle riville */
  footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}