body {
  font-family: "Cantarell", sans-serif;
  background-color: #ddf3f4;
  margin: 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgb(8, 105, 123);
    min-height: 50px;
    color: #ffffff;
    padding: 0 20px;
    width: 100%;
}

/* 1. Flexbasis configuration ensures the logo takes up exact proportional space */
.navbar-left {
    flex: 1; 
    display: flex;
    justify-content: flex-start;
}

.navbar-left .logo {
    text-decoration: none;
    font-weight: bold;
    font-size: 1.8rem;
    transition: color 1000ms;
    color: #ffffff;
    padding: 10px 0;
    white-space: nowrap;
}

.navbar-left .logo:hover {
    color: gold;
}

/* 2. This locks the links right in the middle of the navbar */
.navbar-center {
    display: flex;
    justify-content: center;
    flex: 2; /* Takes up the middle bulk of the screen */
}

.navbar-center .nav-links {
    list-style-type: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 15px;
    font-size: 1.2rem;
}

.navbar-center .nav-links a {
    text-decoration: none;
    padding: 10px 5px;
    transition: color 1000ms;
    color: aquamarine;
    white-space: nowrap;
    font-size: 1.8rem;
}

.navbar-center .nav-links a:hover {
    color: gold;
}

/* 3. DUMMY PSEUDO-ELEMENT AT THE BOTTOM OF YOUR NAVBAR SECTION */
/* This balances out the logo on the left so the center can be mathematically centered! */
.navbar::after {
    content: "";
    flex: 1.1; 
}

@media (max-width: 900px) {
    .navbar {
        flex-direction: column; 
        padding: 15px;
        text-align: center;
        gap: 10px;
    }

    /* Disables the balancing act so things don't shift on phones */
    .navbar::after {
        display: none; 
    }

    .navbar-left {
        flex: initial;
        justify-content: center;
    }

    .navbar-center {
        flex: initial;
        justify-content: center;
        width: 100%;
    }

    .navbar-center .nav-links {
        justify-content: center;
        gap: 10px;
    }

    .navbar-center .nav-links a {
        padding: 8px;
        font-size: 1rem;
    }
}

.description {
  font-size: 1.2rem;
  color: rgb(6, 73, 85);
  padding: 10px;
  text-align: justify;

}

.main-content {
  width: 100%;
  max-width: 1126px;
  /* Keeps it perfectly sized on desktop */
  margin: 40px auto;
  padding: 40px 20px;
  /* Slightly reduced side padding on mobile */
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  text-align: center;
}



.main-content img {
  border-radius: 16px;
  width: 100%;
  /* Allows the image to scale down responsively */
  max-width: 300px;
  /* Prevents it from blowing up too huge on desktop */
  height: auto;
  /* Keeps aspect ratio perfect */
  margin: 20px auto;
  /* Centers it nicely */
  display: block;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.page-title {
  color: rgb(8, 105, 123);
  font-size: 2.2rem;
  margin-top: 0;
  /* Removes default browser top spacing */
  margin-bottom: 24px;
  /* Clean gap before the first card starts */
  text-align: center;

}

.description {
  font-size: 1.4rem;
  color: rgb(6, 73, 85);
  padding: 10px;
  text-align: justify;

}


.project-actions {
  display: flex;
  flex-wrap: wrap;
  /* crucial: allows buttons to cleanly wrap to the next line */
  gap: 8px;
  /* Reduces space between buttons slightly to maximize room */
  margin-top: 15px;
  width: 100%;
  justify-content: center;
}

.contact-card a,
.conract-card *
 {
  display: flex;
  flex-wrap: wrap;
  /* crucial: allows buttons to cleanly wrap to the next line */
  gap: 8px;
  /* Reduces space between buttons slightly to maximize room */
  margin-top: 15px;
  width: 100%;
  justify-content: center;
  font-size: 20px;
}

.project-actions .btn {
  flex: initial;
  /* Fixes the squeeze: stops forcing buttons to expand equally */
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.85rem;
  text-align: center;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  /* Keeps text like "View Source" nicely on a single line */
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* Two columns of exactly equal width */
  gap: 30px;
  /* Creates a clean gutter space between columns */
  align-items: start;
  /* Prevents shorter columns from stretching awkwardly */
  margin-top: 20px;
}

.portfolio-grid-list {
  display: grid;
  margin-top: 20px;
}

/* Adds a tight stack layout inside each column */
.column-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* Spacing between individual cards in the same column */
}

.section-title {
  font-size: 1.4rem;
  color: #1a4d4a;
  /* Using your signature teal color */
  text-align: center;
  margin-bottom: 15px;
  border-bottom: 2px solid #ddf3f4;
  /* Subtle accent line under the category titles */
  padding-bottom: 8px;
}




.project-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.18);
}


.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.apps-container {
  text-align: left;
  max-width: 900px;
  margin: 0;
}



.main-content h1,
.apps-container h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 2.2rem;
}

.project-card h3 {
  margin: 0 0 5px 0;
  color: #0f172a;
  font-size: 1.1rem;
}

.project-card p {
  text-align: justify;
  padding: 0em;
  color: rgb(6, 73, 85);
  font-size: 1rem;
}

.tag {
  background: #f1f5f9;
  color: #475569;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/*  Responsive Design fallback for Mobile Screens */
@media (max-width: 900px) {

  /* Keeps the overall container fitting snug on the phone screen */
  .main-content {
    padding: 20px 15px;
    margin: 10px auto;
    width: 100%;
    overflow: hidden;
    /* Prevents stray items from forcing horizontal scroll */
  }

  /* Centers the overall content block */
  .apps-container {
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    /* Helps center the section titles nicely on a phone */
  }

  /* Forces your grids to use single rows that perfectly respect the screen borders */
  .portfolio-grid,
  .portfolio-grid-list {
    grid-template-columns: 1fr !important;
    width: 100%;
    gap: 20px;
    padding: 0;
  }

  /* Fixes titles from pushing past the card edge */
  .project-card h3 {
    font-size: 1.2rem;
    word-wrap: break-word;
    /* Allows long titles like "Symphony no.1 in G" to wrap cleanly */
  }

  /* Forces the movement buttons to wrap perfectly inside the card bounds */
  .project-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
  }

  /* Adjusts the buttons to share screen space gracefully on small phones */
  .project-actions .btn {
    font-size: 0.75rem;
    /* Slightly smaller font for mobile screens */
    padding: 8px 4px;
    /* Less side padding inside the button */
    white-space: normal !important;
    /* OVERRIDES NOWRAP: Allows text to drop to a 2nd line if screen is tiny */
    flex: 1 1 calc(50% - 4px);
    /* Puts exactly 2 buttons per row side-by-side */
    min-width: 100px;
    /* Prevents buttons from squeezing into nothing */
  }
}

.btn {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.btn-primary {
  background-color: rgb(39, 146, 135);
  font-size: 0.8rem;
  color: white;
  margin: 2px;
}

.btn-primary:hover {
  background-color: rgb(30, 115, 106);
  color: gold;
}

.btn-secondary {
  background-color: #f1f5f9;
  font-size: 0.8rem;
  color: #334155;
  border: 1px solid #cbd5e1;
}



.btn-secondary:hover {
  background-color: #ddf3f4;
}

a.btn-secondary:hover {
  color: black;
}

.legacy-code-box {
  margin-top: 10px;
  margin-bottom: 20px;
  padding: 20px;
  background-color: #f8fafc;

  border-radius: 0 8px 8px 0;
}

/* Blog.css */

/* Centers the entire blog section on your screen */
.blog-container {
  max-width: 950px;
  margin: 0 auto;
  /* Reduced top padding from 40px to 10px */
  padding: 10px 20px 40px 20px;
}

/* Spaces out your cards vertically */
.blog-grid {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  /* Generous vertical gap between cards */
}

/* Your card base layout */
.blog-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: row;
  align-items: center;
  /* Centers items horizontally within the card */
  gap: 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.18);
}

/* Styling for the Badge type text */
.badge {
  font-size: 0.85rem;
  color: #718096;
  font-weight: 500;
  margin-bottom: 6px;
}

/* Heading style adjustments */
.blog-card h2 {
  font-size: 1.4rem;
  color: #1a202c;
  margin: 0 0 4px 0;
}

.post-date {
  font-size: 0.85rem;
  color: #035798;
  /* A soft grey to keep it subtle */
  margin: -8px 0 8px 0;
  /* Tighten the spacing between title and image */
  font-weight: 500;
}

/* Left side container constraints */
.blog-image-left {
  flex-shrink: 0;
  /* Prevents the image container from squishing */
  display: flex;
  justify-content: center;
  align-items: center;
}

.blog-image-left img {
  max-width: 150px;
  /* Sized beautifully for a row badge */
  width: 100%;
  height: auto;
}

/* Right side details container */
.blog-content-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* Left-aligns text elements */
  text-align: left;
  /* Changes text from center to left-aligned */
  flex-grow: 1;
}


/* --- Your requested post-text attributes --- */
.post-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #4a5568;
  /* Soft slate gray for readability */
  max-width: 600px;
  /* Prevents text from stretching too wide */
  margin: 8px 0 16px 0;
  font-weight: 400;
}

/* Wrapper to isolate the tags block spacing */
.tags {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}

/* --- Mobile Responsive Rules --- */
@media (max-width: 768px) {
  .blog-container {
    padding: 10px 16px 20px 16px;
    /* Slightly tighter padding on mobile */
  }

  .blog-card {
    flex-direction: column;
    /* Stack image on top of text */
    align-items: center;
    /* Center everything inside the card */
    gap: 16px;
    /* Reduce the massive desktop gap */
    padding: 16px;
    /* Give text more breathing room */
  }

  .blog-image-left img {
    max-width: 120px;
    /* Slightly scale down the badge for smaller screens */
  }

  .blog-content-right {
    align-items: center;
    /* Center text alignments for mobile view */
    text-align: center;
    /* Centers the headings and description text */
    width: 100%;
  }

  .post-text {
    max-width: 100%;
    /* Allows text to fill the mobile container safely */
    margin: 8px 0;
  }

  .tags {
    justify-content: center;
    /* Keeps tags neatly centered under the text */
  }
}

.blog-carousel {
    width: 100%;
    height: 100%;
}

.blog-image-left {
    position: relative;
    overflow: hidden;
}

.carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 4px;
    z-index: 2;
}

.prev-btn { left: 8px; }
.next-btn { right: 8px; }

.carousel-counter {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

