/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --text-color: #333;
  --bg-color: #fff;
  --sidebar-bg: #f8f9fa;
  --border-color: #e1e4e8;
  --link-color: #0366d6;
  --hover-color: #0056b3;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

/* Navigation Bar */
.site-nav {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.site-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
  transition: opacity 0.3s;
}

.site-title:hover {
  opacity: 0.8;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s;
}

.nav-menu a:hover {
  opacity: 0.8;
}

/* Main Layout */
.site-main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.page-wrapper {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

/* Sidebar */
.sidebar {
  flex: 0 0 300px;
  position: sticky;
  top: 100px;
}

.author-profile {
  background-color: var(--sidebar-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.author-avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 75% 65%;
  margin-bottom: 1rem;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.author-name {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.author-bio {
  color: #666;
  margin-bottom: 1rem;
  line-height: 1.6;
  font-size: 0.9rem;
  word-wrap: break-word;
}

.author-email {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  word-break: break-all;
}

.author-email i {
  margin-right: 0.5rem;
  color: #1976d2;
}

.author-email a {
  text-decoration: none;
  transition: opacity 0.3s;
}

.author-email a:hover {
  opacity: 0.7;
}

.author-location {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.author-links {
  list-style: none;
  margin-top: 1rem;
}

.author-links li {
  margin-bottom: 0.5rem;
}

.author-links a {
  color: var(--link-color);
  text-decoration: none;
  display: inline-block;
  transition: color 0.3s;
}

.author-links a:hover {
  color: var(--hover-color);
}

.author-links i {
  margin-right: 0.5rem;
  width: 20px;
}

/* Main Content */
.main-content {
  flex: 1;
  min-width: 0;
}

.main-content.full-width {
  max-width: 800px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.page-title {
  font-size: 2rem;
  color: var(--primary-color);
}

.page-content {
  font-size: 1rem;
  line-height: 1.8;
}

/* Tab Navigation */
.tab-navigation {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
  background-color: #f8f9fa;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.tab-button {
  flex: 1;
  padding: 1rem 2rem;
  background-color: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: #666;
  transition: all 0.3s;
  position: relative;
}

.tab-button:hover {
  background-color: #e9ecef;
  color: var(--primary-color);
}

.tab-button.active {
  background-color: white;
  color: var(--secondary-color);
  border-bottom-color: var(--secondary-color);
  font-weight: 600;
}

/* Content Sections */
.content-section {
  margin-bottom: 2rem;
  display: none !important;
}

.content-section.active {
  display: block !important;
}

/* Content Styling */
.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.page-content h1 {
  font-size: 2rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.page-content h2 {
  font-size: 1.5rem;
}

.page-content h3 {
  font-size: 1.25rem;
}

.page-content p {
  margin-bottom: 1rem;
}

.page-content ul,
.page-content ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

.page-content li {
  margin-bottom: 0.5rem;
}

.page-content a {
  color: var(--link-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.page-content a:hover {
  border-bottom-color: var(--link-color);
}

.page-content code {
  background-color: #f6f8fa;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
}

.page-content hr {
  border: none;
  border-top: 2px solid var(--border-color);
  margin: 2rem 0;
}

/* Footer */
.site-footer {
  background-color: var(--primary-color);
  color: white;
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .page-wrapper {
    flex-direction: column;
  }
  
  .sidebar {
    flex: none;
    width: 100%;
    position: static;
    margin-bottom: 2rem;
  }
  
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
  }
}

.anchor {
  display: block;
  position: relative;
  top: -80px;
  visibility: hidden;
}