/* GENERAL STYLES */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

:root {
    /* Color Palette - Consistent with style.css */
    --primary-purple: #6a0572;
    --secondary-purple: #9b59b6;
    --light-purple: #e0c3fc;
    --light-blue: #8ec5fc;
    --dark-text: #343a40;
    --medium-text: #6c757d;
    --light-text: #adb5bd;
    --background-light: #f8f9fa;
    --background-medium: #f0f2f5;
    --background-white: #ffffff;
    --border-light: #e9ecef;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-strong: rgba(0, 0, 0, 0.25);

    /* Spacing - Consistent with style.css */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    --spacing-xxl: 80px;

    /* Border Radius - Consistent with style.css */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50%;
}

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

body {
    font-family: "Inter", sans-serif;
    background-color: var(--background-medium);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    line-height: 1.6;
    color: var(--dark-text);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

p {
    color: var(--medium-text);
    padding: 0;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: var(--spacing-sm);
    text-align: justify;
}

a,
.btn {
    transition: all 300ms ease;
}

/* DESKTOP NAV - Consistent with style.css */
nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 4px 15px var(--shadow-light);
    transition: all 0.3s ease;
    width: 100%;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
    font-size: 1.05rem;
    font-weight: 500;
}

a {
    color: var(--dark-text);
    text-decoration: none;
}

a:hover {
    color: var(--primary-purple);
    text-decoration: underline;
    text-underline-offset: var(--spacing-xs);
    text-decoration-color: var(--secondary-purple);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-purple);
}

.logo:hover {
    cursor: default;
}

/* HAMBURGER MENU - Consistent with style.css */
#hamburger-nav {
    display: none;
}

.hamburger-menu {
    position: relative;
    display: inline-block;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 24px;
    width: 30px;
    cursor: pointer;
}

.hamburger-icon span {
    width: 100%;
    height: 2px;
    background-color: var(--dark-text);
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
}

.menu-links {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--background-white);
    width: fit-content;
    min-width: 180px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 20px var(--shadow-medium);
}

.menu-links a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 1.05rem;
    color: var(--dark-text);
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

.menu-links a:hover {
    background-color: var(--background-light);
    color: var(--primary-purple);
    text-underline-offset: 4px;
}

.menu-links li {
    list-style: none;
}

.menu-links.open {
    max-height: 300px;
}

.hamburger-icon.open span:first-child {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-icon.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-icon.open span:last-child {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* SECTION STYLES - Consistent with style.css */
section {
    width: 100%;
    max-width: 1400px;
    padding: var(--spacing-xxl) var(--spacing-md);
    text-align: center;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--background-medium); /* Default section background */
}

#projects-section { /* Specific background for the main projects section */
    background-color: var(--background-white);
    border-radius: var(--radius-lg);
    margin: var(--spacing-lg) auto;
    box-shadow: 0 8px 25px var(--shadow-light);
}

/* Sub-titles for project categories */
#projects-section h2 {
    font-size: 2.2rem;
    color: var(--dark-text);
    /* margin: var(--spacing-xxl) auto var(--spacing-lg) auto; Top margin for separation */
    font-weight: 700;
    text-align: center;
}


/* TITLE STYLES - Consistent with style.css */
.title {
    background: linear-gradient(to right, var(--primary-purple), var(--secondary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 3.5rem;
    text-align: center;
    margin: var(--spacing-sm) auto var(--spacing-lg) auto;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* PROJECTS CONTAINER - Adjusted for responsive grid layout */
.projects-container-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: var(--spacing-lg); /* Consistent gap */
    justify-items: center; /* Center items in grid cells */
    align-items: stretch; /* Ensure cards have equal height */
    padding-bottom: var(--spacing-lg);
    width: 100%;
}

/* --- PROJECT ENTRY STYLES - Consistent with project-card in style.css --- */
.project-entry {
    display: flex;
    flex-direction: column;
    width: 100%; /* Take full width of grid cell */
    max-width: 450px; /* Max width for individual card */
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    padding: var(--spacing-md);
    text-align: left;
    background-color: var(--background-light);
    box-shadow: 0 6px 20px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-entry:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px var(--shadow-medium);
}

.project-entry-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.project-entry-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-xs);
    flex-wrap: wrap;
}

.project-entry-title {
    font-size: 1.5rem;
    color: var(--dark-text);
    margin: 0 auto var(--spacing-xs) auto; /* Center title */
    flex-basis: 100%;
    font-weight: 700;
    text-align: center;
}

.project-entry-description {
    font-size: 1rem;
    color: var(--medium-text);
    line-height: 1.6;
    margin-top: auto;
    margin-bottom: var(--spacing-md);
    padding: 0 var(--spacing-xs);
    text-align: justify;
}

/* Project Buttons Container */
.project-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: auto;
    width: 100%;
}

/* Button styles for both GitHub and Visit Site links - Consistent with style.css */
.github-link,
.visit-site-link {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.github-link {
    background-color: var(--dark-text);
    color: white;
    border: 1px solid var(--dark-text);
}

.github-link:hover {
    background-color: var(--medium-text);
    border-color: var(--medium-text);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-medium);
}

.visit-site-link {
    background: linear-gradient(to right, var(--primary-purple), var(--secondary-purple));
    color: white;
    border: 1px solid transparent;
}

.visit-site-link:hover {
    background: linear-gradient(to right, #500456, #84479e);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-medium);
}

/* Contact section styles - Consistent with style.css */
#contact {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: fit-content;
    padding: var(--spacing-xxl) var(--spacing-md);
    color: white;
    width: 100%;
}

#contact .section__text__p1 {
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

#contact .title {
    background: none;
    -webkit-text-fill-color: white;
    color: white;
    text-align: center;
}

.contact-info-upper-container {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 30px var(--shadow-strong);
    margin: var(--spacing-lg) auto;
    padding: var(--spacing-md);
    flex-wrap: wrap;
    gap: var(--spacing-md);
    max-width: 600px;
    width: 100%;
}

.contact-info-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    margin: 0;
    width: auto;
    flex-basis: auto;
}

.contact-info-container p {
    font-size: 1.1rem;
    color: white;
    padding: 0;
    text-align: center;
}

.contact-info-container p a {
    color: white;
    text-decoration: none;
}

.contact-info-container p a:hover {
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.7);
}

.contact-icon {
    cursor: default;
    height: 35px;
    filter: brightness(2);
}

/* Footer styles - Consistent with style.css */
footer {
   
    text-align: center;
    width: 100%;
    padding: var(--spacing-md) 0;
    
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap;
}

footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    padding: 0;
    margin-bottom: 0;
    text-align: center;
}

footer p a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    margin: 0;
    font-size: 0.95rem;
}

footer p a:hover {
    color: var(--light-purple);
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-color: var(--light-purple);
}

.copyright {
    margin-top: var(--spacing-xs);
}

/* --- Modal styles - Consistent with style.css --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
    pointer-events: none;
}

.modal[aria-hidden="false"] {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.7);
    object-fit: contain;
    transform: scale(0.95);
    transition: transform 0.3s ease-out;
}

.modal[aria-hidden="false"] .modal-content {
    transform: scale(1);
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 50px;
    font-weight: lighter;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

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

.modal-open {
    overflow: hidden;
}