/* Basic Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  line-height: 1.6;
  background-color: #f4f7f6;
  color: #333;
  padding: 20px;
  /* padding-top: 40px; Removed to allow header to be at the top */
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.bento-box {
  background-color: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.bento-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.bento-box h1, .bento-box h2 {
  margin-bottom: 15px;
  color: #2c3e50;
}

.bento-box-title { /* For clickable titles in expandable boxes */
  cursor: pointer;
  position: relative;
  padding-right: 25px; /* Space for an indicator */
}

.bento-box-title::after { /* Simple expand/collapse indicator */
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2em;
  color: #3498db;
  transition: transform 0.3s ease;
}

.expandable-box.expanded .bento-box-title::after {
  content: '−'; /* Minus sign when expanded */
  transform: translateY(-50%) rotate(180deg); /* Corrected Y transform for indicator */
}

.bento-box-summary {
  /* This is the default state, shown when not expanded */
  display: block;
  transition: opacity 0.3s ease-out, max-height 0.3s ease-out;
  max-height: 200px; /* Adjust if summaries are longer */
  opacity: 1;
}

.expandable-box.expanded .bento-box-summary {
  /* Hide summary when box is expanded */
  display: none; /* Or use opacity and max-height for a fade-out effect */
  max-height: 0;
  opacity: 0;
  margin-bottom: 0; /* Remove margin when hidden */
  overflow: hidden;
}

.bento-box-content {
  display: none; /* Crucial: Start as display:none for max-height transition to work from 0 */
  margin-top: 0; /* Start with no margin if summary is present */
  padding-top: 0; /* Start with no padding */
  border-top: 1px solid #eee;
  max-height: 0; /* Start with 0 height */
  overflow: hidden;
  transition: max-height 0.4s ease-in-out, padding-top 0.4s ease-in-out, margin-top 0.4s ease-in-out;
  border-top: 1px solid #eee; /* Keep border, but it will be hidden initially */
}

.expandable-box.expanded .bento-box-content {
  display: block; /* This is set by JS adding 'expanded', then CSS makes it visible */
  max-height: 1000px; /* Adjust as needed, should be larger than expected content */
  margin-top: 15px;  /* Add margin when expanded */
  padding-top: 15px; /* Add padding when expanded */
  /* transition is already defined above */
}

/* Ensure content within the fetched .page-container div is styled appropriately */
.bento-box-content .page-container {
    padding: 0; /* Remove padding from the fetched container */
    box-shadow: none; /* Remove shadow from the fetched container */
    border-radius: 0; /* Remove border-radius from the fetched container */
    background-color: transparent; /* Make background transparent */
    margin: 0; /* Reset margin */
}

.bento-box-content .page-container h1 {
    font-size: 1.3em; /* Adjust heading size within bento box */
    border-bottom: none; /* Remove border from h1 in fetched content */
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.bento-box p {
  margin-bottom: 10px;
  color: #555;
}

.bento-box a {
  color: #3498db;
  text-decoration: none;
}

.bento-box a:hover {
  text-decoration: underline;
}

/* Connect Box Specifics */
.connect-box {
  align-self: start;  /* Prevents vertical stretching */
}

/* Profile Box Specifics */
.profile {
  grid-column: span 1; /* Adjust as needed for layout */
  /* text-align: center; */
}

.profile-img {
  width: 120px;
  /* height: 120px; */
  border-radius: 18px;
  object-fit: cover;
  margin-bottom: 15px;
  /* border: 3px solid #3498db; */
  position: relative;
  /* align center */
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.profile h1 {
    font-size: 1.8em;
    margin-bottom: 10px;
      text-align: center;

}

.profile-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.profile-links img {
  width: 60px; /* Adjust size as needed */
  /* height: 32px; */
  transition: transform 0.2s ease;
}

.profile-links a:hover img {
  transform: scale(1.1);
}

/* Recommendation logos — small consistent icons before recommendation links */
.rec-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 8px;
}

/* Ensure recommendation lines align nicely */
.recommendations-box p,
.recommendations-box a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-bio {
  font-size: 0.95em;
  color: #444;
}

/* Link styles within boxes */
.bento-link {
  display: inline-block;
  background-color: #3498db;
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.bento-link:hover {
  background-color: #2980b9;
  text-decoration: none;
  color: #fff;
}

/* Boxes Images */
.box-img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    margin-top: 10px;
}

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

/* Responsive adjustments */
@media (min-width: 768px) {
  .profile {
    /* Example: make profile box span more columns on larger screens */
    /* grid-column: span 2; */
  }
  .intro {
    /* grid-column: span 2; */
  }
}

@media (min-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr); /* Example: 3 columns on large screens */
    }
    .profile {
        grid-column: 1 / 2; /* Span 1 column */
        grid-row: 1 / 3; /* Span 2 rows */
    }
    .intro {
        grid-column: 2 / 4; /* Span 2 columns */
    }
}

/* Styling for inner pages like education.html, experiences.html */
.page-container {
  max-width: 900px; /* Or your preferred width */
  margin: 20px auto; /* Centered with some top/bottom margin */
  padding: 30px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.page-container h1 {
  color: #2c3e50;
  margin-bottom: 20px;
  border-bottom: 2px solid #3498db;
  padding-bottom: 10px;
}

.page-container ul {
  list-style-position: inside;
  padding-left: 0; /* Reset default padding */
}

.page-container li {
  margin-bottom: 15px;
  line-height: 1.7;
}

.page-container p {
  margin-bottom: 15px;
  color: #555;
}

.page-container a {
  color: #3498db;
  text-decoration: none;
}

.page-container a:hover {
  text-decoration: underline;
}

/* Header styling for inner pages */
.site-header {
  background-color: #fff; /* Or a subtle color like #f8f9fa */
  padding: 15px 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  margin-bottom: 30px; /* Space between header and page content */
    border-radius: 18px;

}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px; /* Consistent with bento grid max-width or slightly less */
  margin: 0 auto;
}

.logo {
  font-size: 1.6em;
  font-weight: bold;
  color: #2c3e50;
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 25px;
}

.nav-links a {
  text-decoration: none;
  color: #34495e;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover, .nav-links a.active { /* Assuming you might add an 'active' class via JS */
  color: #3498db;
}

.menu-toggle { /* Basic styling for mobile menu toggle if you implement it */
  display: none; /* Hidden on desktop */
  font-size: 1.8em;
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
}

/* Responsive for nav if needed later */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .menu-toggle {
    display: block;
    padding: 10px;
  }
}
