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

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  /* Hindra iOS/iPadOS från att blåsa upp textstorleken i liggande läge */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1a1a1a;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

.layout {
  display: flex;
  align-items: flex-start;
  max-width: 1500px;
  margin: 0 auto;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: 300px;
  flex-shrink: 0;
  padding: 52px 40px;
  position: sticky;
  top: 0;
}

.brand {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.5px;
  color: #111;
  text-decoration: none;
  display: block;
}

.tagline {
  margin-top: 6px;
  font-size: 14px;
  color: #8c8c8c;
}

.nav {
  margin-top: 120px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.nav a {
  font-size: 17px;
  font-weight: 500;
  color: #1a1a1a;
  text-decoration: none;
  width: fit-content;
}

.nav a:hover {
  text-decoration: underline;
}

.nav a.active {
  font-weight: 700;
}

/* ---------- Content ---------- */
.content-wrap {
  flex: 1;
  border-left: 1px solid #e8e8e8;
  min-height: 100vh;
}

.content {
  max-width: 760px;
  border-right: 1px solid #e8e8e8;
  padding: 60px 72px 120px;
}

.post-title {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin: 0;
  color: #111;
}

.post-date {
  margin-top: 12px;
  font-size: 13px;
  color: #9a9a9a;
}

.lead {
  margin-top: 28px;
  font-size: 17px;
  color: #333;
}

.section-title {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: 46px;
  line-height: 1.06;
  letter-spacing: -1px;
  color: #111;
  margin: 64px 0 28px;
}

.content p {
  font-size: 16px;
  line-height: 1.9;
  color: #2b2b2b;
  margin: 18px 0;
}

.content em {
  font-style: italic;
}

.content ul {
  list-style: circle;
  padding-left: 26px;
  margin: 22px 0;
}

.content li {
  font-size: 16px;
  line-height: 1.9;
  color: #2b2b2b;
  margin: 6px 0;
  padding-left: 6px;
}

.content li b {
  color: #111;
}

/* ---------- Empty blog state ---------- */
.empty-state {
  margin-top: 60px;
  color: #9a9a9a;
  font-size: 16px;
}

/* ---------- Flag box ---------- */
.flag-box {
  margin: 44px 0 8px;
  padding: 22px 26px;
  border: 1.5px solid #111;
  border-radius: 12px;
  background: #fafafa;
}

.flag-box .flag-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #8c8c8c;
  margin-bottom: 10px;
}

.flag-box code {
  font-family: "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
  font-size: 18px;
  font-weight: 600;
  color: #111;
  user-select: all;
  word-break: break-all;
}

/* ---------- Responsive ---------- */

/* iPad liggande och mindre laptops: behåll två kolumner men dra ihop dem */
@media (max-width: 1100px) {
  .layout {
    max-width: 100%;
  }
  .sidebar {
    width: 260px;
    padding: 44px 32px;
  }
  .nav {
    margin-top: 72px;
  }
  .content {
    padding: 52px 56px 100px;
  }
}

/* iPad stående och telefoner: en kolumn med toppmeny */
@media (max-width: 900px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    position: static;
    width: 100%;
    padding: 32px 28px 12px;
  }
  .nav {
    margin-top: 22px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 28px;
  }
  .nav a {
    padding: 4px 0;
  }
  .content-wrap {
    border-left: none;
    border-top: 1px solid #e8e8e8;
    width: 100%;
    min-height: 0;
  }
  .content {
    border-right: none;
    padding: 32px 28px 72px;
    max-width: 100%;
  }
  .post-title {
    font-size: 26px;
  }
  .section-title {
    font-size: 32px;
  }
}
