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

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 1.3rem; /* Base font size, adjust as needed */
  color: #1f1f1f;
}

/* Hero / About Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  background: #f5f5f5;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url(https://assets.simpleviewinc.com/simpleview/image/fetch/c_limit,q_75,w_1200/https://assets.dam.simpleviewinc.com/asset/618162ebe6e035006b34c6d6) no-repeat center center/cover;
  filter: blur(8px);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.profile-pic {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 20px;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.tagline {
  font-size: 1.2rem;
  color: #1f1f1f;
  margin-bottom: 20px;
}

.social-icons {
  display: flex;
  justify-content: center;
  align-items: center; /* Align items vertically */
  gap: 20px; /* Increased gap slightly for the new icon */
  margin-bottom: 20px;
}

.social-icons a {
  text-decoration: none;
  font-size: 2.5rem; /* Keep icon size consistent */
  color: #333;
  transition: color 0.3s ease; /* Smooth transition for hover */
}
.social-icons a .fa-file, .social-icons a .fa-envelope { /* Slightly smaller for file and envelope */
    font-size: 2.2rem;
}


.social-icons a:hover {
  color: rgba(73, 115, 63, 0.97);
}

.about-text {
  margin-bottom: 30px;
  line-height: 1.6;
  font-size: 1rem; /* Adjusted for better readability within the block */
}

.about-info {
  background: rgba(255, 255, 255, 0.85); /* Slightly more opaque */
  padding: 25px;
  border-radius: 15px; /* Softened radius */
  margin-top: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* Subtle shadow */
}

.about-info h1,
.about-info .tagline,
.about-info .about-text,
.about-info .social-icons {
  margin-bottom: 15px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background: #0077b5;
  color: #fff;
  text-decoration: none;
  border-radius: 20px;
  transition: background 0.3s;
  font-weight: bold;
  font-size: 1rem;
}

.btn:hover {
  background: #005c8c;
}

/* Portfolio Section */
.portfolio-section {
  padding: 60px 20px;
  background: #343a40;
}

html {
  scroll-behavior: smooth;
}

.portfolio-container {
  max-width: 1200px; /* Wider for potentially 3 columns */
  margin: 0 auto;
  text-align: center;
}

.portfolio-container h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: #f8f9fa;
}

/* --- NEW GRID STYLES --- */
.projects-grid {
  display: grid;
  /* Responsive grid: min 280px width, fill available space, create as many columns as fit */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px; /* Gap between project cards */
}

/* --- REMOVED SLIDER-SPECIFIC STYLES --- */
/* .projects-slider, .slider-container (old), .slide-group, .arrow related styles are removed or repurposed */

.project-card {
  background: #fafafa;
  border-radius: 15px;
  text-align: left; /* Title will be left-aligned within its content box */
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  overflow: hidden; /* Important for image and border-radius */
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  /* aspect-ratio: 1 / 1; REMOVED to allow content to define height */
}

.project-card:hover {
  transform: translateY(-8px); /* Slightly more lift */
  box-shadow: 0 10px 25px rgba(0,0,0,0.2); /* More prominent shadow */
}

.project-card img {
  width: 100%;
  height: auto;         /* Let aspect-ratio and width determine height */
  aspect-ratio: 16 / 9; /* Example: for a 16:9 widescreen ratio. Adjust as needed (e.g., 4/3, 1/1) */
  object-fit: cover;    /* Ensures the image fills this defined aspect ratio, cropping if necessary */
  display: block;
  border-bottom: 1px solid #eee;
}

.project-card-content {
  padding: 20px; /* More padding around the title */
  flex-grow: 1; /* Allows content to take up remaining space if card height varies */
  display: flex; /* To center title if needed or align items */
  flex-direction: column;
  justify-content: center; /* Centers title vertically if card has extra space */
}

.project-card h3 {
  margin-bottom: 0; /* No margin if it's the only item */
  font-size: 1.2rem; /* Slightly larger title on card */
  color: #333;
  text-align: center; /* Center title text */
}

/* REMOVED .btn-view from card as it's no longer directly on the card */

/* Responsive Adjustments */
@media (max-width: 900px) {
  .portfolio-container {
    padding-left: 15px;
    padding-right: 15px;
  }
   .projects-grid {
    /* For tablet, auto-fit with minmax(280px, 1fr) likely results in 2 columns. */
    /* If specific 2-column is desired: grid-template-columns: repeat(2, 1fr); */
    gap: 20px;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 1.1rem; /* Adjust base font for mobile */
  }
  h1 {
    font-size: 2rem;
  }
  .tagline {
    font-size: 1.1rem;
  }
  .about-info {
    padding: 20px;
  }
  .projects-grid {
    grid-template-columns: 1fr; /* Stack to 1 column on mobile */
    gap: 25px;
  }
  .project-card img {
    height: 200px; /* Adjust image height for single column layout */
  }
  .project-card h3 {
    font-size: 1.1rem;
  }
}

/* Modal Styles (largely unchanged, ensure they still work well) */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0, 0, 0, 0.7); /* Darker overlay */
}

.modal-content.split {
  background: #fff;
  margin: 5% auto;
  padding: 25px; /* Increased padding */
  border-radius: 10px; /* Softer radius */
  max-width: 900px;
  min-height: 500px; 
  display: flex;
  flex-wrap: wrap; /* Allow wrapping for responsiveness */
  position: relative;
  box-shadow: 0 5px 20px rgba(0,0,0,0.25);
}

.modal-left {
  flex: 1; /* Takes 1 part of flex space */
  min-width: 300px; /* Minimum width before wrapping or shrinking too much */
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-left img {
  max-width: 100%;
  max-height: 450px; /* Max height for the image in modal */
  height: auto;
  border-radius: 6px;
}

.modal-right {
  flex: 1.5; /* Takes 1.5 parts of flex space, more room for text */
  min-width: 300px;
  padding: 15px;
  flex-direction: column;
  /* justify-content: center; REMOVED to allow natural top alignment */
  overflow-y: auto;
}

.modal-right h3,
.modal-right h4,
.modal-right p,
.modal-right li {
  margin-bottom: 12px;
}
/* Add this to static/style.css */

.modal-right .modal-buttons {
  margin-top: 20px; /* Keeps space above the button group */
  /* If you had 'display: flex;' here from trying side-by-side, you can remove it for this method */
}

.modal-right .modal-buttons .btn-project {
  display: block; /* Ensures each button takes its own line if not already */
  width: fit-content; /* Adjusts button width to its content. Or use a fixed width, or 100% */
  margin-left: auto;  /* If width is not 100%, this helps center it */
  margin-right: auto; /* If width is not 100%, this helps center it */
  margin-bottom: 40px; /* << ADDS 15px SPACE BELOW EACH BUTTON */
}

/* Remove margin from the very last button to prevent extra space at the bottom */
.modal-right .modal-buttons .btn-project:last-child {
  margin-bottom: 0;
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px; /* Larger close button */
  font-weight: bold;
  color: #555; /* Darker close button */
  cursor: pointer;
  transition: color 0.2s ease;
}
.close:hover {
    color: #000;
}


@media (max-width: 768px) {
  .modal-content.split {
    flex-direction: column;
    margin: 10% auto; /* More margin on mobile */
    padding: 20px;
    min-height: 0; /* Allow content to define height */
  }
  .modal-left, .modal-right {
    flex: 1 1 100%; /* Allow full width when stacked */
    padding: 10px;
  }
  .modal-left img {
    max-height: 250px; /* Adjust image height in modal for mobile */
  }
}

/* Styles for Dynamically Loaded Markdown Content (Unchanged but reviewed for compatibility) */
.project-details-container {
    text-align: left;
    color: #333;
}
.modal-right .project-details-container {
    height: auto; /* Changed from 100% to fit content */
    /* overflow-y: auto; This is on modal-right now */
    padding-right: 10px; 
}
/* ... other .project-details-container styles (h1-h4, p, ul, ol, li, pre, code, a, img) remain the same ... */
.project-details-container h1,
.project-details-container h2,
.project-details-container h3,
.project-details-container h4 {
  margin-top: 20px; /* Reduced top margin */
  margin-bottom: 10px;
  color: #1a252f;
}
.project-details-container p {
  margin-bottom: 12px;
  line-height: 1.7; /* Increased line height for readability */
}
.project-details-container ul,
.project-details-container ol {
  margin-bottom: 12px;
  padding-left: 25px;
}
.project-details-container li {
  margin-bottom: 6px;
}
.project-details-container pre {
  background-color: #f8f9fa; /* Lighter code block */
  border: 1px solid #e9ecef; /* Softer border */
  border-radius: 4px;
  padding: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-bottom: 12px;
  font-size: 0.85em; /* Smaller font for code */
}
.project-details-container code {
  font-family: 'Courier New', Courier, monospace;
  background-color: #e9ecef; 
  padding: 2px 4px; /* Smaller padding */
  border-radius: 3px;
  font-size: 0.85em;
}
.project-details-container pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
}
.project-details-container a {
  color: #0077b5;
  text-decoration: none;
  font-weight: bold;
}
.project-details-container a:hover {
  text-decoration: underline;
}
.project-details-container img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-top: 8px;
  margin-bottom: 8px;
}
