/* ============================================
   Base Layout — Shared across all themes
   Two-column: sidebar (left) + content (right)
   ============================================ */

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- Layout Container --- */
.container {
  max-width: var(--page-width, 1000px);
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
}

/* --- Two-Column Page Layout --- */
.page-layout {
  display: flex;
  gap: var(--layout-gap, 3rem);
  align-items: flex-start;
}

/* --- Sidebar (Left Column) --- */
.sidebar {
  position: sticky;
  top: 2rem;
  width: var(--sidebar-width, 220px);
  flex-shrink: 0;
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-photo {
  margin-bottom: 1.25rem;
}

.profile-photo img {
  width: var(--avatar-size, 160px);
  height: var(--avatar-size, 160px);
  border-radius: var(--avatar-radius, 50%);
  object-fit: cover;
  transition: border-radius 0.3s ease;
}

.profile-name {
  font-family: var(--font-heading, var(--font-body));
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.profile .position,
.profile .affiliation {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.profile .email {
  font-family: var(--font-mono, monospace);
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

/* --- Social Links --- */
.social-links {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: var(--heading);
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.15s ease, color 0.15s ease;
}

.social-links a:hover {
  color: var(--accent);
  transform: scale(1.15);
}

/* --- Main Column (Right) --- */
.main-column {
  flex: 1;
  min-width: 0;
}

/* --- Content Area --- */
.content {
  line-height: 1.75;
}

.content h2 {
  font-family: var(--font-heading, var(--font-body));
  font-size: var(--h2-size, 1.2rem);
  font-weight: var(--h2-weight, 500);
  color: var(--heading);
  text-transform: var(--h2-transform, lowercase);
  letter-spacing: var(--h2-spacing, 0.01em);
  margin-top: 0;
  margin-bottom: 1rem;
}

.content h2:not(:first-child) {
  margin-top: 2rem;
}

.content hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

.content p {
  margin-bottom: 1rem;
  color: var(--text);
}

.content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

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

.content strong {
  font-weight: 600;
  color: var(--text);
}

.content em {
  font-family: var(--font-accent, 'Lora', Georgia, serif);
  font-style: italic;
}

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

.content li {
  margin-bottom: 0.35rem;
}

.content code {
  font-family: var(--font-mono, monospace);
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

/* --- Footer --- */
.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* --- Responsive: Tablet & Mobile --- */
@media (max-width: 768px) {
  .container {
    padding: 2rem 1.25rem 1.5rem;
  }

  .page-layout {
    flex-direction: column;
    gap: 2rem;
  }

  .sidebar {
    position: static;
    width: 100%;
  }

  .profile {
    align-items: center;
    text-align: center;
  }

  .profile-name {
    font-size: 1.5rem;
  }

  .site-footer {
    text-align: center;
  }
}
