/* Root Variables */
:root {
    --primary-color: #4E2957; /* Royal Purple */
    --secondary-color: #6A3A7B; /* Supporting tone */
    --accent-color: #855B92; /* Accent lighter purple */
    --neutral-light: #FAF3F5; /* Softened for portfolio section */
    --text-dark: #2C3E50;
    --white: #FFFFFF;
    --footer-background: #4E2957; /* Match hero tone */
}

/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    line-height: 1.6;
    background: var(--white);
    color: var(--text-dark);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navigation */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 40px;
    background-color: var(--primary-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

#brand a {
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
}

#menu {
    list-style: none;
    display: flex;
    gap: 20px;
}

#menu li a {
    text-decoration: none;
    font-size: 1rem;
    color: var(--neutral-light);
    position: relative;
    transition: color 0.3s;
}

#menu li a:hover {
    color: #D4C2E8; /* Brighter hover color */
}

/* Portfolio Header */
.portfolio-header {
    background-color: var(--white);
    color: var(--text-dark);
    text-align: center;
    padding: 100px 20px 40px;
    margin-top: 80px; /* Offset for fixed navigation */
}

.portfolio-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #B488C7; /* Lighter variant for distinction */
    margin-bottom: 10px;
}

.portfolio-description {
    font-size: 1rem;
    margin-bottom: 20px;
    color: #4E2C4A; /* Slightly darker text */
}

.portfolio-links {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 10px 20px;
}

.portfolio-links a {
    margin: 0 5px;
    color: var(--primary-color);
    text-decoration: none;
}

.portfolio-links a:hover {
    text-decoration: underline;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Adjusted for 4 items in a row */
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.portfolio-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(78, 41, 87, 0.2); /* Subtle purple shadow */
    position: relative; /* Set relative positioning for child elements */
}

.portfolio-item img {
    width: 100%;
    max-width: 150px; /* Adjusted for centering */
    height: auto;
    margin: 0 auto; /* Ensure centered alignment */
    display: block;
}

.portfolio-item h3 {
    position: absolute; /* Position text outside the box */
    bottom: -40px; /* Move the text below the box */
    left: 50%;
    transform: translateX(-50%); /* Center the text horizontally */
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color); /* Softer but distinct */
    text-align: center;
}

/* Footer */
.footer {
    background-color: var(--footer-background);
    color: var(--white);
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
    width: 100%;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.footer h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.social-links a {
    color: var(--white);
    font-size: 1.5rem;
    text-decoration: none;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #A67DA5; /* Brighter accent hover */
}

.footer-details {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #e0e0e0;
}

.footer-details a {
    color: var(--white);
    text-decoration: underline;
}

.footer-details a:hover {
    color: #A67DA5; /* Match hover effect */
}

/* Ensure the footer stays at the bottom of the page */
html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex-grow: 1;
}
