body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: #181c24;
  color: #e7eaf0;
  font-size: 20px;
  letter-spacing: 0.01em;
  line-height: 1.7;
}

/* Top Navigation Bar (fixed on desktop only) */
.topnav {
  width: 100%;
  background: #232836;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  height: 100px;
  z-index: 1000;
  flex-wrap: nowrap;
  padding-left: 500px; /* Sidebar width on desktop */
  box-sizing: border-box;
  transition: padding-left 0.3s;
  overflow-x: auto;
}

.topnav a {
  color: #e7eaf0;
  text-decoration: none;
  padding: 2rem 2.5rem;
  font-size: 1.3rem;
  font-weight: 500;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, padding 0.3s;
  border-radius: 3px 3px 0 0;
  display: block;
  white-space: nowrap;
  letter-spacing: 0.01em;
  margin: 0;
}
.topnav a:hover, .topnav a.active {
  background: #181c24;
  color: #6cb2ff;
}

/* Main wrapper with enough top padding for nav bar (Desktop Only) */
.main-wrapper {
  display: flex;
  margin: 0;
  min-height: 80vh;
  padding-top: 100px; /* Must match .topnav height on desktop */
  transition: padding-top 0.3s;
}

/* Fixed Sidebar (Desktop, always fixed width, no horizontal scroll) */
.sidebar {
  position: fixed;
  top: 100px; /* Must match .topnav height */
  left: 0;
  height: calc(100vh - 100px);
  width: 500px;
  min-width: 500px;
  max-width: 500px;
  background: #232836;
  padding: 32px 20px;
  box-sizing: border-box;
  border-right: 1px solid #232836;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 101;
  overflow-x: hidden;  /* Prevent horizontal scroll */
  overflow-y: auto;
  transition: width 0.3s, top 0.3s;
}

/* Ensure all sidebar content fits */
.profile-card, .sidebar img, .sidebar .profile-card {
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.profile-card {
  background: #232836;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.14);
  padding: 24px 18px 18px 18px;
  text-align: center;
  width: 100%;
  max-width: 100%;
  margin-bottom: 32px;
}
.profile-card img {
  width: 100%;
  max-width: 300px;
  height: auto;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 16px;
  border: 4px solid #232836;
  background: #181c24;
}
.profile-card h1 { font-size: 1.7rem; margin: 0 0 8px 0; color: #fff; font-weight: 700;}
.profile-card h2 { font-size: 1.25rem; font-weight: 400; color: #a0b3d6; margin: 0 0 12px 0; }
.profile-card p { font-size: 1.18rem; color: #b2b9c9; margin: 0 0 10px 0; }
.contact-info { margin-top: 18px; font-size: 1.13rem; color: #e7eaf0; }
.contact-info a { color: #6cb2ff; text-decoration: none; word-break: break-all; }
.contact-info a:hover { text-decoration: underline; }

.content {
  flex: 1 1 0;
  padding: 40px 32px 40px 32px;
  background: #181c24;
  min-width: 0;
  margin-left: 510px; /* sidebar width + extra spacing */
  max-width: 1100px;
  margin-right: auto;
}

section {
  margin-bottom: 2.5rem;
}
section h2 {
  color: #6cb2ff;
  font-size: 1.6rem;
  margin-bottom: 0.7rem;
  border-left: 4px solid #232836;
  padding-left: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
ul, ol { padding-left: 1.2rem; }
li { margin-bottom: 0.4rem; }

/* ----------- RESPONSIVE BREAKPOINTS ----------- */

/* For screens below 1200px: sidebar and nav adjust */
@media (max-width: 1200px) {
  .topnav { padding-left: 300px; }
  .sidebar {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
  }
  .content { margin-left: 310px; }
}

/* For screens below 1100px: 
   - Make the nav bar static (not fixed)
   - Remove sidebar offset
   - Remove main-wrapper padding-top
   - Allow nav links to wrap and grow in height
*/
@media (max-width: 1100px) {
  .main-wrapper { flex-direction: column; padding-top: 0; }
  .sidebar {
    position: static;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border-right: none;
    border-bottom: 1px solid #232836;
    flex-direction: row;
    justify-content: center;
    height: auto;
    overflow-y: visible;
    overflow-x: hidden;
    top: 0;
    padding: 24px 8px;
  }
  .profile-card { margin-bottom: 0; max-width: 100%; }
  .content {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    padding: 28px 10px;
  }
  .topnav {
    position: static;
    padding-left: 0;
    justify-content: flex-start;
    align-items: stretch;
    flex-direction: row;
    gap: 16px;
    min-height: unset;
    height: auto;
    box-shadow: none;
    border-bottom: 1px solid #232836;
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .topnav a {
    padding: 1rem 1rem;
    font-size: 1.1rem;
    border-radius: 0;
    border-bottom: none;
    text-align: left;
    white-space: nowrap;
  }
}

/* For screens below 600px: nav links even smaller, stack vertically */
@media (max-width: 600px) {
  .sidebar { flex-direction: column; align-items: center; padding: 12px 2px; }
  .content { padding: 12px 2px; }
  .profile-card { padding: 12px 6px; }
  .topnav {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    position: static;
    padding-left: 0;
    justify-content: flex-start;
    gap: 0;
    border-bottom: 1px solid #232836;
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .topnav a {
    padding: 0.8rem 0.8rem;
    font-size: 1.02rem;
    border-radius: 0;
    text-align: left;
    border-bottom: 1px solid #232836;
    white-space: normal;
  }
}

img, video {
  max-width: 100%;
  height: auto;
}

.container, .content, main, section {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
}

.content, .content p, .content li, .content div, section, section p, section li {
  text-align: justify;
}
