/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --bg-color: #f9fafb;
  --surface-color: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --accent-color: #2563eb;
  --border-color: #e2e8f0;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
}

/* Sticky Header */
.sticky-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 1rem 0;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-placeholder {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.logo-placeholder svg {
  color: var(--accent-color);
}

.sticky-header nav {
  display: flex;
  gap: 1.5rem;
}

.sticky-header nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.sticky-header nav a:hover,
.sticky-header nav a.active {
  color: var(--accent-color);
}

/* Page Layout */
.page-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 4rem;
  position: relative;
}

/* Sidebar Table of Contents */
.sidebar-toc {
  display: none; /* Hidden on mobile by default */
}

@media (min-width: 1024px) {
  .sidebar-toc {
    display: block;
    position: sticky;
    top: 6rem; /* Adjust based on header height */
    height: fit-content;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
  }
}

.sidebar-toc h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.sidebar-toc ul {
  list-style: none;
  border-left: 1px solid var(--border-color);
}

.sidebar-toc li a {
  display: block;
  padding: 0.5rem 0 0.5rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: all 0.2s;
}

.sidebar-toc li a:hover {
  color: var(--text-primary);
}

.sidebar-toc li a.active {
  color: var(--accent-color);
  border-left-color: var(--accent-color);
  font-weight: 500;
}

/* Main Content */
.main-content {
  max-width: 800px;
}

@media (max-width: 1023px) {
  .page-layout {
    display: block;
  }
  .main-content {
    margin: 0 auto;
  }
}

.last-updated-badge {
  display: inline-block;
  background-color: #eff6ff; /* Light blue bg */
  color: var(--accent-color);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.intro {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 6rem; /* Offset for sticky header */
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

p,
li {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.7;
}

ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

ul li {
  margin-bottom: 0.5rem;
}

/* Contact Card */
.contact-card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 2px 4px -1px rgba(0, 0, 0, 0.03);
  text-align: center;
}

.contact-card p {
  margin-bottom: 1rem;
  font-weight: 500;
}

.contact-email {
  color: var(--accent-color);
  font-weight: 600;
  text-decoration: none;
  font-size: 1.125rem;
}

.contact-email:hover {
  text-decoration: underline;
}

/* Responsive details */
@media (max-width: 640px) {
  h1 {
    font-size: 1.875rem;
  }

  .page-layout {
    padding: 2rem 1rem;
  }

  .sticky-header nav {
    gap: 0.75rem; /* Reduce gap for mobile */
  }
}
