/* Complete CSS file for your portfolio site */

/* ===== BASE STYLES ===== */

/* Import Montserrat font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&display=swap');

body {
  /* Clean sans-serif font, 16px, dark grey text */
  font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  color: #333;
  line-height: 1.6;
  
  /* White/beige background */
  background-color: #faf8f3;  /* Soft beige - change to #fff for pure white */
  margin: 0;
  padding: 0;
}

/* Main content container - centered and constrained */
main {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADINGS ===== */
h1, h2, h3, h4, h5, h6 {
  color: #333;
  margin-top: 24px;
  margin-bottom: 10px; /* Reduced from default to minimize gap */
  font-weight: 600;
}

/* Chart headings (=h4 with limited spacing to the chart)*/
.chart-container h4 {
  margin-top: 24px;
  margin-bottom: 0px;  /* Adjust this value (default is 16px) */
}

.big {
  font-size: 2.5em;
}

h2 {
  font-size: 1.75em;
}

.small {
  font-size: 1.25em;
}


/* ===== PARAGRAPHS ===== */
p {
  margin-bottom: 1em;
  font-weight: 300;
}

/* Make strong/bold tags actually bold */
strong, b {
  font-weight: 600;
}

/* ===== SECTIONS ===== */
section {
  margin-bottom: 2.5em;
}


/* ===== LINKS ===== */
a {
  color: #065f46;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Links in paragraphs: different font & spacing, no color change, just underline on hover */
p a {
  color: inherit;
  text-decoration: none;
  font-family: 'Courier New', Courier, monospace;
}

p a:hover {
  text-decoration: underline;
}

/* ===== IN TEXT LAYOUT ===== */
p.bullet {
  padding-left: 20px;
  position: relative;
}

p.bullet::before {
  content: "•";
  position: absolute;
  left: 0;
}

/* ===== IMAGES ===== */
img {
  max-width: 100%;
  height: auto;
}

/* Center images in chart containers */
.chart-container img {
  display: block; /* Ensures the image behaves like a block element */
  margin: 0 auto; /* Centers the image horizontally */
}


/* ===== HEADER - SPLIT LAYOUT ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  margin-bottom: 0px;  /* Reduced from 40px */
  background-color: #faf8f3;
}

.header-left h1 {
  margin: 0;
  font-size: 2em;
  color: #333;
  font-weight: 600;
}

.header-right {
  display: flex;
  gap: 20px;
}

.header-right a {
  color: #333;
  font-size: 1em;
  font-weight: 400;
}

.header-right a:hover {
  text-decoration: underline;
}

.header-right a.active {
  font-weight: 700;  /* Bold only, no color change */
}

/* ===== FOOTNOTES ===== */
.footnote-separator {
  border: none;
  border-top: 1px solid #ccc;  /* Grey line */
  margin: 60px 0 40px 0;        /* Space above and below */
}

#footnotes h3 {
  font-size: 1.2em;
  color: #333;                   /* Slightly grey */
}

.footnote-text {
  font-size: 0.9em;              /* Smaller text */
  color: #666;                   /* Grey text */
  line-height: 1.5;
}

/* ===== FOOTER - SIMPLE ===== */
footer {
  margin-top: 60px;
  padding: 20px 40px;
  text-align: center;
  font-size: 0.9em;
}

footer a {
  color: #333;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

footer p {
  margin-top: 10px;
  color: #666;
  font-size: 0.85em;
}


/* ===== CHART CONTAINERS ===== */
.chart-container {
  margin-top: 0px;
  margin-bottom: 0px;
  text-align: left;  /* Ensures content is left-aligned */
}

.chart-description {
  margin-top: 0px;
  margin-bottom: 0px;
  color: #333;
}

.chart-source {
  margin-top: 0px;
  margin-bottom: 0px;
  color: #333;
  font-size: 0.9em;      /* Slightly smaller (90% of base size) */
  font-style: italic; 
}


/* ===== DASHBOARD GRID (for CC6) ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 20px 0;
}

.dashboard-chart {
  min-height: 250px;
}

/* Responsiveness: stack charts on small screens */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}


/* ===== NAVIGATION GUIDE (for index.html) ===== */
#navigation-guide p {
  margin-bottom: 1.2em;
}


/* ===== INDEX PAGE SPECIFIC STYLES ===== */

/* Centered title */
.centered-title {
  text-align: center;
  font-size: 2.5em;
  margin-top: 40px;
  margin-bottom: 30px;
}

/* Centered quote styling */
.centered-quote {
  text-align: center;
  margin: 40px auto;
  max-width: 800px;
}

.quote-text {
  font-style: italic;
  font-size: 1.1em;
  line-height: 1.8;
  margin-bottom: 15px;
  color: #555;
}

.quote-author {
  font-style: normal;
  font-weight: 400;
  color: #333;
  margin-top: 10px;
}

/* Navigation links */
#navigation h3 {
  margin-top: 30px;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}

#navigation h3 a {
  color: #333;
  text-decoration: none;
  font-size: 1.0em;
  font-weight: 600;
}

#navigation h3 a:hover {
  color:#333;
  text-decoration: underline;
}

/* ===== COLLAPSIBLE SECTIONS ===== */
.collapsible-section {
  margin-bottom: 20px;
}

.collapsible-header {
  cursor: pointer;
  padding: 15px 0;  /* Removed left/right padding for cleaner look */
  border-bottom: 1px solid #ddd;  /* Light grey bottom border */
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.collapsible-header:hover {
  background-color: transparent;  /* Remove background on hover */
  border-bottom: 1px solid #999;  /* Slightly darker border on hover */
}

.collapsible-header h2 {
  margin: 0;
}

.toggle-icon::after {
  content: "▼";
  font-size: 0.8em;
  color: #666;  /* Grey arrow */
  transition: transform 0.3s;
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.collapsible-section.active .collapsible-content {
  max-height: 5000px;
  padding-top: 20px;
}

.collapsible-section.active .toggle-icon::after {
  transform: rotate(-180deg);
}


/* ===== CC4 REPLICATION CHART BACKGROUND ===== */
#cc4_chart2 {
  background-image: url('images/cc4_chart2-background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex; /* Use flexbox for alignment */
  flex-direction: column; /* Stack title and chart vertically */
  align-items: center; /* Center align content horizontally */
  justify-content: center; /* Center align content vertically */
  padding: 20px; /* Add padding for spacing */
  box-sizing: border-box; /* Include padding in width/height calculations */
}

/* PROJECT PAGE SPECIFIC STYLES */

/* Table of Contents */
.toc-nav {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin: 30px auto;
    max-width: 600px;
}

.toc-nav h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.2em;
    margin-bottom: 15px;
}

.toc-nav ul {
    list-style: none;
    padding-left: 0;
}

.toc-nav li {
    margin: 10px 0;
}

.toc-nav a {
    color: #0066cc;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.2s;
}

.toc-nav a:hover {
    color: #004499;
    text-decoration: underline;
}

/* ========================================
   PROJECT PAGE SPECIFIC STYLES
   ======================================== */

/* Project Sections */
.project-section {
    margin: 60px auto;
    max-width: 800px;
    padding: 0 20px;
    border-bottom: 1px solid #ddd;  /* Thin separator line */
    padding-bottom: 40px;
}

.project-section h2 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 20px;
}

.project-section p {
    line-height: 1.6;
    margin-bottom: 15px;
    color: #333;
}

/* Technical Notes  */
.technical-details {
    margin-top: 20px;
    margin-bottom: 0;
}

.tech-button {
    background-color: transparent;
    border: 1px solid #333;
    color: #333;
    padding: 8px 16px;
    font-size: 0.85em;
    cursor: pointer;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.2s;
}

.tech-button:hover {
    background-color: #faf8f3;
    border-color: #333;
}

.tech-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    margin-top: 15px;
}

.tech-content.active {
    max-height: 1000px;
}

.tech-content p {
    font-size: 0.85em;
    color: #333;
    line-height: 1.4;
    margin: 8px 0;
}


/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 600px) {
  body {
    padding: 0;
  }
  
  main {
    padding: 0 15px;
  }
  
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 20px 20px;
  }
  
  .header-right {
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .header-left h1 {
    font-size: 1.5em;
  }
  
  /* Adjust carousel item width on mobile */
  .carousel-item {
    flex: 0 0 300px;
  }
}