/* =====================
   BASE & LAYOUT
===================== */
body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: #f5f5f5;
  overflow-x: hidden;
}

.container {
  background-color: white;
  max-width: 1000px;
  margin: 2em auto;
  display: flex;
  flex-direction: row;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  padding: 0 20px;
  width: 100%;
  min-height: calc(100vh - 4em);
}

.sidebar {
  width: 200px;
  padding: 1.5em;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  background-color: white;
}

.sidebar h1 {
  font-size: 38px;
  font-weight: bold;
  color: #444;
  margin-top: 0.5em;
}

.sidebar nav a {
  display: block;
  margin: 10px 0;
  text-decoration: none;
  color: #000;
  line-height: 1.6;
}

.sidebar nav a.active {
  color: #888;
  font-weight: bold;
}

/* =====================
   MAIN CONTENT
===================== */
.content {
  flex: 1;
  padding: 2em;
  max-width: 800px;
  box-sizing: border-box;
}

.content h2 {
  color: #444;
  font-weight: bold;
  padding: 0;
  margin-top: 0;
}

/* Section toggle */
.section {
  display: none;
}
.section.active,
.section:target {
  display: block;
}

/* =====================
   ABOUT SECTION
===================== */
.about-container {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.profile-photo {
  float: left;
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 15px;
  margin-bottom: 10px;
}

#about p {
  line-height: 1.8;
  margin-bottom: 1.2em;
  color: #333;
}

.about-links {
  margin-top: 1em;
  font-size: 1em;
}

.about-links a {
  color: #0073b1;
  text-decoration: none;
  font-weight: normal;
  margin: 0 0.3em;
}

.about-links a:hover {
  text-decoration: underline;
}

/* =====================
   PUBLICATIONS & RESEARCH
===================== */
#publications ul {
  padding-left: 20px;
}

#publications li {
  margin-bottom: 12px;
  font-size: 16px;
  line-height: 1.6;
}

#publications a:link,
#publications a:visited,
#research a:link,
#research a:visited {
  color: #0073b1;
  text-decoration: none;
  font-weight: 500;
}

#publications a:hover,
#research a:hover {
  text-decoration: underline;
  color: #005580;
}

#research ul {
  list-style-type: disc;
  padding-left: 1.2em;
  margin-top: 0.5em;
}

#research li {
  margin-bottom: 1em;
  line-height: 1.6;
  color: #333;
}

#research h3 {
  color: #666;
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

/* =====================
   FOOTER & TEXT
===================== */
footer {
  text-align: center;
  padding: 1em;
  font-size: 0.9em;
  color: #666;
}

.note-text,
.source-text {
  font-size: 14px;
  color: #666;
  max-width: 800px;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* =====================
   LINKS
===================== */
a:link,
a:visited {
  color: #0073b1;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =====================
   BUTTONS
===================== */
button {
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
}

button:hover {
  background-color: #e0e0e0;
}

/* =====================
   CHARTS & PLOTS
===================== */
.chart-wrapper,
.plot-wrapper {
  width: 100%;
  padding: 0;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

canvas.responsive-canvas,
.plot-wrapper canvas {
  display: block;
  width: 100%;
  height: auto;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 750;
}

/* Desktop layout: center and fixed width */
@media (min-width: 1024px) {
  .plot-wrapper {
    overflow-x: visible;
    display: flex;
    justify-content: center;
  }

  .plot-wrapper canvas {
    width: 800px;
    min-width: unset;
  }
}

/* =====================
   MOBILE ADJUSTMENTS
===================== */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .chart-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .chart-scroll-inner {
    width: 800px;
    min-width: 800px;
  }

  canvas.responsive-canvas {
    width: 100%;
    height: auto;
    display: block;
  }
}
