/* === Global Resets & Base Styles === */
body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f6f8;
    color: #333;
    font-size: 16px;
}

main {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

header h1 {
    text-align: center;
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 30px;
    font-weight: 300;
}

/* === Section Styling === */
.experience-section, .education-section {
    margin-bottom: 30px;
}

#education-container > h2,
.experience-section > h2 {
    font-size: 1.8em;
    color: #34495e;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 25px;
    font-weight: 400;
}

/* === Job & Institution Styling === */
.job, .institution {
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 3px solid #3498db;
}

.job h3, .institution h3 {
    font-size: 1.3em;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 0; 
    margin-bottom: 5px;
}

.dates {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 8px;
    font-style: italic;
}

.location {
    font-size: 0.9em;
    color: #95a5a6;
    margin-bottom: 10px;
}

.location.company-location {
    font-weight: 500;
}

/* === Description Lists === */
ul {
    padding-left: 20px;
    margin-top: 8px;
    margin-bottom: 15px;
    list-style-type: disc;
}

li {
    margin-bottom: 8px;
    color: #555;
    font-size: 0.95em;
}

/* === Project Demo Styling (Original and new Demo Block) === */
.project-demo { /* General styling for the demo container */
    margin-top: 15px;
    padding: 10px 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e7e7e7;
}

.project-demo strong { /* For the title within the demo block */
    color: #3498db; /* Accent color for project title */
    display: block; /* Make title block for better spacing if needed */
    margin-bottom: 5px;
}

/* Specific styles for the new "demo-block" layout with image on left */
.demo-block {
    display: flex;
    align-items: flex-start; /* Align items to the top */
    gap: 20px; /* Space between image and text */
}

.demo-image-container {
    flex: 0 0 150px; /* Image container fixed width. Adjust as needed. */
    /* Consider using percentages for more responsiveness e.g., flex: 0 0 30%; max-width: 150px; */
}

.demo-image-container img {
    width: 100%; /* Make image fill its container */
    height: auto;
    border-radius: 4px;
    border: 1px solid #ddd; /* Slightly more prominent border for demo image */
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.demo-image-container img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.demo-text-content {
    flex: 1; /* Text content takes remaining space */
}

.demo-text-content p {
    margin-top: 0; /* Remove top margin for paragraphs inside demo text */
    margin-bottom: 8px; /* Space between paragraphs in demo text */
}
.demo-text-content p:last-child {
    margin-bottom: 0;
}


/* === Role Images Styling === */
.role-images {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    justify-content: center;
}

.role-images figure {
    margin: 0;
    flex: 0 1 300px;
    text-align: center;
}

.role-images img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.role-images img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.role-images figcaption {
    font-size: 0.85em;
    color: #666;
    padding: 0 5px;
}

/* === Lightbox Modal Styles === */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.85);
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 85%;
  max-height: 80vh;
  border-radius: 4px;
}

#lightbox-caption {
  margin: 15px auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  font-size: 1.1em;
  line-height: 1.4;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  line-height: 1;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

.lightbox-content, #lightbox-caption {
  animation-name: zoom;
  animation-duration: 0.4s;
}

@keyframes zoom {
  from {transform:scale(0.8)}
  to {transform:scale(1)}
}

/* === Divider === */
hr.section-divider {
    border: none;
    height: 1px;
    background-color: #dce4e8;
    margin: 40px 0;
}

/* === Footer === */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    font-size: 0.9em;
    color: #95a5a6;
}

/* === Links === */
a {
    color: #3498db;
    text-decoration: none;
}

a:hover, a:focus {
    text-decoration: underline;
    color: #2980b9;
}