/* Global Settings */
/* Prevent horizontal scrolling */
html, body {
    width: 100%;
    overflow-x: hidden;
    height: 100%; /* Ensure the body takes full height */
}

/* Layout */
body {
    font-family: 'Poppins', sans-serif;
    font-weight: 300; /* Light for body text */
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #fff;    ;
    color: #282b30;
    text-align: left;
    display: flex;
    flex-direction: column;
    min-height: 100%; /* Ensure the body takes full height */
}

/* Container */
.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 20px;
    flex: 1;
    box-sizing: border-box;
    width: 100%;
    margin-top: 40px; /* Added margin to the top of the container */
    margin-bottom: 40px; /* Added margin to the bottom of the container */
}

/* Typography */
/* Headings */
h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 36px;
    line-height: 1.3;
    margin-bottom: 10px;
    color: #3F51B5
}

h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 28px;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #3F51B5; /* Ocean Indigo */
}

/* Paragraphs */
p {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 18px;
    line-height: 1.7;
    color: #444B54
}

/* Subtitle style */
.subtitle {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 20px;
    color: #444B54;
    margin-top: -10px;
    margin-bottom: 20px;
}

/* Layout - Header */
.header {
    padding: 40px 0;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    box-shadow: 0px 0px 5px rgba(40, 43, 48, 0.2);
}

/* Social Links */
.social-links {
    list-style: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: left;
    gap: 10px;
    margin-top: 20px;
}

.social-links li {
    display: flex;
    align-items: center;
}

/* Social Buttons */
.linkedin-button, .github-button, .email-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background-color: transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Social Button Hover Effects */
.linkedin-button:hover, .github-button:hover, .email-button:hover {
    background-color: #C8BFE7; /* Lavender Mist */
    transform: translateY(-3px); /* Optional lift effect */
}

.linkedin-button, .github-button, .email-button:active {
    transform: scale(0.95); /* Small tap effect */
}

/* Social Icons */
.linkedin-logo, .github-logo, .email-logo {
    width: 60px;
    height: 60px;
}

/* Projects */
.projects {
    padding-bottom: 40px;
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding-top: 20px;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Project Card */
.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0px 5px 10px rgba(25, 27, 31, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-height: 280px;
    cursor: pointer;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    z-index: 0;
}

.project-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background-color: white;
    z-index: 1;
    box-shadow: inset 0 20px 20px -20px rgba(0, 0, 0, 0.05); /* creates visual spacing effect */
}

.project-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background-color: white;
    z-index: 1;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

/* Background Images for Project Cards */
.project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: darken;
    background-color: rgba(0, 0, 0, 0.07);
    transition: transform 0.6s ease-in-out;
    z-index: 0;
}

.project-card:nth-child(1)::before {
    background-image: linear-gradient(to bottom, #6f7ed4, #bdb4e3);
}

.project-card:nth-child(2)::before {
    background-image: linear-gradient(to bottom, #C8BFE7, #7986D7);
}

.project-card:nth-child(3)::before {
    background-image: linear-gradient(to bottom, #9A8CD7, #C8BFE7);
}

.project-card:nth-child(4)::before {
    background-image: linear-gradient(to bottom, #7986D7, #C8BFE7);
}

.project-card:nth-child(5)::before {
    background-image: linear-gradient(to bottom, #5A6ACF, #C8BFE7);
}

.project-card:nth-child(6)::before {
    background-image: linear-gradient(to bottom, #7986D7, #C8BFE7);
}

/* Project Card Hover Effects */
.project-card:hover::before, .project-card:active::before {
    transform: scale(1.05);
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(255, 255, 255, 0.4),
                0 0 25px rgba(255, 255, 255, 0.6); /* bright white glow */
}

.project-card:hover::before {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Project Card Links and Text */
.project-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    padding: 40px 20px 40px;
    box-sizing: border-box;
    text-align: center;
    pointer-events: none;
}

.project-card h3,
.project-card p {
    font-size: 16px;
    margin: 0;
    line-height: 1.6;
    position: relative;
    z-index: 3;
    color: #000000;
    text-decoration: none;
    text-align: center;
    margin-bottom: 10px;
    transition: text-shadow 0.3s ease;
    pointer-events: auto;
    padding-top: 6px;
}

/* Footer */
.footer-container {
    width: 100%;
    margin-top: auto;
    position: relative;
    bottom: 0;
    left: 0;
    background-color: #F4F6FA;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    flex-shrink: 0;
    border-top: 1px solid #C8BFE7;
    padding: 20px;
}

footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* Align footer text to the left */
    padding: 20px;
}

footer p {
    margin: 0;
    text-align: left; /* Align footer text to the left */
    width: 100%; /* Ensures the text spans across the full width */
    max-width: 860px; /* Match container width */
    margin-left: auto; /* Center align the text in the footer container */
    margin-right: auto; /* Center align the text in the footer container */
    color: #444B54;
}

/* Theme - Dark Mode */
body.dark-mode {
    background-color: #121212;
    color: #E1E5F2;
}

body.dark-mode .subtitle {
    color: #D0D3E1;
}

body.dark-mode p {
    color: #D0D3E1;
}

body.dark-mode footer p {
    color: #B8BFD9;
}

body.dark-mode h2 {
    color: #AAB4F7;
}

body.dark-mode .footer-container {
    background-color: #1D1D1D;
    border-top: 1px solid #3F51B5;
}

body.dark-mode .linkedin-button:hover,
body.dark-mode .github-button:hover,
body.dark-mode .email-button:hover {
  background-color: #3F51B5;
}

body.dark-mode .project-card h3,
body.dark-mode .project-card p {
  color: #FFFFFF;
}

body.dark-mode .project-content,
body.dark-mode .project-card::after {
    background-color: #1D1D1D; /* Matches dark mode footer */
}

body.dark-mode .project-card::after {
    box-shadow: inset 0 20px 20px -20px rgba(255, 255, 255, 0.05); /* softened shadow for dark mode */
}

/* Media Queries */
/* Container padding adjustment */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
}

/* Responsive typography and social links alignment */
@media (max-width: 768px) {
    h1 {
        font-size: 28px;
        text-align: left;
    }

    p {
        font-size: 16px;
        text-align: left;
    }

    .social-links {
        justify-content: left;
    }
}

/* Responsive project grid */
@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark mode prefers-color-scheme override */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
    color: #E1E5F2;
  }

  .project-card h3,
  .project-card p {
    color: #FFFFFF;
  }

  .project-content,
  .project-card::after {
    background-color: #1D1D1D;
  }

  .project-card::after {
    box-shadow: inset 0 20px 20px -20px rgba(255, 255, 255, 0.05);
  }
}