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

/* Base styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  line-height: 1.6;
  color: #2d3748;
  background: #ffffff;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}
section {
  max-width: 700px;
  position: relative;
  margin-right: 0px;
  /* Make room for sidenotes */
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.3;
  color: #1a202c;
  margin: 2rem 0 1rem;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.5rem;
}

p,
ul,
ol {
  margin-bottom: 1.5rem;
}

/* List items */
li {
  margin: 1.2rem 0;
  /* Increased from previous value */
  line-height: 1.6;
}

/* Nested lists should have less spacing */
li li {
  margin: 0.6rem 0;
  /* Half the spacing for nested items */
}

/* Links */
a {
  color: #2b6cb0;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

a:hover {
  border-bottom-color: currentColor;
}

/* Navigation with responsive image and proper line breaks */
.sidenav {
  background: #f7fafc;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.sidenav a {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  margin: 0.25rem 0;
  color: #4a5568;
  border-radius: 4px;
  transition: all 0.2s;
  box-sizing: border-box;
  white-space: normal;
  /* Ensure text wraps */
  word-wrap: break-word;
  /* Handle long words */
}

.sidenav img {
  width: 100%;
  height: auto;
  max-width: 300px;
  /* Increased from 250px */
  display: block;
  margin: 1rem auto;
  aspect-ratio: 1 / 1;
}

/* Progressive size adjustments */
/* Progressive size adjustments */
@media (min-width: 1400px) {
  .sidenav a {
    font-size: 1.25rem;
  }

  .sidenav img {
    max-width: 300px;
  }

  /* Increased */
}

@media (max-width: 1399px) and (min-width: 1200px) {
  .sidenav a {
    font-size: 1.1rem;
  }

  .sidenav img {
    max-width: 260px;
  }

  /* Adjusted proportionally */
}

@media (max-width: 1199px) and (min-width: 992px) {
  .sidenav a {
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
    /* Slightly reduced padding */
  }

  .sidenav {
    padding: 1.25rem;
  }

  .sidenav img {
    max-width: 190px;
  }
}

@media (max-width: 991px) and (min-width: 768px) {
  .sidenav a {
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
    /* Further reduced padding */
  }

  .sidenav {
    padding: 1rem;
  }

  .sidenav img {
    max-width: 160px;
  }
}

/* Tablet and mobile adjustments */
@media (max-width: 767px) {
  .sidenav {
    padding: 1rem;
  }

  .sidenav a {
    font-size: 1rem;
    text-align: center;
    padding: 0.75rem;
  }

  .sidenav img {
    max-width: 200px;
  }
}

.sidenav a:hover {
  background: #edf2f7;
  color: #2b6cb0;
}

/* Layout */
.wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  /* Increased from 250px to 300px */
  gap: 2rem;
  max-width: 65rem;
  margin: 0 auto;
}

/* Main content section */
section {
  padding-right: 2rem;
}

@media (min-width: 768px) {
  .wrapper {
    grid-template-columns: minmax(0, 1fr) 250px;
    align-items: start;
  }

  .sidenav {
    position: sticky;
    top: 2rem;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .wrapper {
    grid-template-columns: 1fr;
  }

  section {
    padding-right: 0;
  }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  body {
    padding: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .sidenav a {
    display: block;
    text-align: center;
  }
}

/* Print styles */
@media print {
  body {
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .sidenav {
    display: none;
  }
}

/* Icon styles */
.socials {
    display: flex;
    gap: 0.6rem;
    margin-top: 1rem;
}

.socials a {
    display: inline-flex;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon {
    width: 20px;   /* try 16–24px */
    height: 20px;
}