/* Basic Reset: Make sure all browsers start from a clean slate */

@import url('https://fonts.googleapis.com/css2?family=Alumni+Sans:ital,wght@0,100..900;1,100..900&display=swap');
* {
    margin: 0; /* Remove default spacing around elements */
    padding: 0; /* Remove default padding inside elements */
    box-sizing: border-box; /* A super important rule for easy layout! */
}

/* General responsive image rule - ensure this is present */
img {
    max-width: 100%; /* Important: Images never overflow their parent */
    height: auto;    /* Important: Preserves aspect ratio */
    display: block;  /* Helps with layout and removes extra space below images */
}

/* Global Body Styles: Sets basic look for the entire page */
body {
    font-family: 'Alumni Sans', sans-serif; /* Use the Google Font we linked */
    line-height: 1.6; /* Spacing between lines of text */
    color: #333; /* Dark gray for text, easy to read */
    background-color: #f9f9f9; /* Very light gray background for the page */
}

/* Container: A common trick to keep content centered and readable */
.container {
    max-width: 1200px; /* Maximum width of your content area */
    margin: auto; /* Centers the container on the page */
    padding: 0 25px; /* Adds space on the left/right edges */
    overflow: hidden; /* Clears any elements that might float outside */
}

/* Headings (h1, h2, etc.): Make them stand out */
h1, h2, h3, h4, h5, h6, .logo { /* Apply the Playfair Display font */
    font-family: 'Playfair Display', serif;
    color: #222; /* Slightly darker than body text */
    margin-bottom: 20px;
}

h1 { font-size: 3.8em; } /* Large for the main title */
h2 { font-size: 2.8em; } /* Medium for section titles */
h3 { font-size: 1.6em; } /* Smaller for subheadings */

p {
    margin-bottom: 15px; /* Space below paragraphs */
}

/* Links: How links look */
a {
    color: #9B7B61; /* A sophisticated brownish-gold color for links */
    text-decoration: none; /* No underline by default */
    transition: color 0.3s ease; /* Smooth color change on hover */
}

a:hover {
    color: #7D614A; /* Darker shade on hover */
    text-decoration: underline; /* Add underline on hover */
}

/* Buttons: Make your call-to-action buttons pretty */
.btn {
    display: inline-block; /* Allows padding and margin */
    background: #9B7B61; /* Button background color */
    color: #fff; /* White text on button */
    padding: 12px 25px;
    border-radius: 5px; /* Slightly rounded corners */
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth effects */
    border: none; /* No ugly border */
    cursor: pointer; /* Changes mouse cursor to a pointer */
}

.btn:hover {
    background: #7D614A; /* Darker background on hover */
    transform: translateY(-2px); /* Makes button lift slightly */
    text-decoration: none; /* No underline on hover */
}

.btn-small {
    padding: 8px 15px; /* Smaller padding for smaller buttons */
    font-size: 0.9em;
    border-radius: 4px;
}

/* Sections: Give each major part of your page consistent spacing */
section {
    padding: 100px 0; /* Top and bottom spacing for sections */
    text-align: center; /* Centers content within sections */
}
#about, #contact { /* Alternate background for visual separation */
    background-color: #ffffff;
}
#portfolio {
    background-color: #f2f2f2;
}

/* Header Styling: How the top bar looks */
header {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #eee; /* Thin line at the bottom */
    position: sticky; /* Makes header stick to the top when scrolling */
    top: 0; /* Sticks to the very top */
    z-index: 1000; /* Ensures header is always on top of other content */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* Subtle shadow for depth */
}

header .container {
    display: flex; /* Uses Flexbox for easy arrangement */
    justify-content: space-between; /* Puts logo on left, nav on right */
    align-items: center; /* Centers items vertically */
}

header .logo {
    font-size: 2em;
    font-weight: bold;
    color: #222;
    letter-spacing: -1px; /* Slightly tightens letters */
}

header nav ul {
    list-style: none; /* Removes bullet points from nav links */
}

header nav ul li {
    display: inline-block; /* Makes nav links go horizontally */
    margin-left: 35px; /* Space between nav links */
}

header nav ul li a {
    color: #555;
    font-weight: 600;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent; /* For a cool hover effect */
    transition: all 0.3s ease;
}

header nav ul li a:hover {
    color: #9B7B61; /* Link color on hover */
    border-bottom: 2px solid #9B7B61; /* Underline effect on hover */
}

/* Hero Section Styling: The big intro part */
#hero {
    /* Overlay a white gradient then add a background image */
    background: linear-gradient(rgba(255,255,255,0.8), rgba(255,255,255,0.8)), url('../img/hero-background.jpg') no-repeat center center/cover;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #333;
    padding: 20px;


}


#hero img {
    max-height: 500px; /* CHANGED: This makes the logo larger on laptops */
     /* Maintains aspect ratio */
    margin-bottom: 20px; /* Space below the logo */
    display: block; /* Ensures it behaves as a block element for centering */
    margin-left: auto; /* Centers the image horizontally */
    margin-right: auto; /* Centers the image horizontally */
}

#hero .container {
    max-width: 900px;
}

#hero h1 {
    font-size: 4.8em;
    line-height: 1.1;
    margin-bottom: 25px;
    color: #222;
}

#hero p {
    font-size: 1.8em;
    color: #666;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* About Section Styling: Zara's profile and skills */
#about .profile-img {
    max-width: 800px; /* CHANGED: Set a reasonable max-width for desktops */
    height: auto;    /* CHANGED: Maintain aspect ratio */
    margin: 0 auto 40px auto; /* ADDED: Centers the image horizontally, keeps bottom margin */
    border-radius: 0%; /* If you want it square, otherwise change to 50% for round */
    object-fit: cover;
    border: 8px solid #f2f2f2;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

#about p {
    font-size: 1.15em;
    max-width: 900px;
    margin: 0 auto 30px auto; /* Centers paragraph horizontally */
    line-height: 1.7;
}

.skills-list {
    list-style: none;
    display: flex; /* Arranges skills horizontally */
    flex-wrap: wrap; /* Allows skills to wrap to next line on small screens */
    justify-content: center; /* Centers skills */
    gap: 15px; /* Space between skill items */
    margin-top: 30px;
}

.skills-list li {
    background: #e9e9e9;
    padding: 10px 20px;
    border-radius: 25px; /* Rounded pill shape */
    font-size: 0.95em;
    color: #666;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Portfolio Section Styling: The project grid */
.portfolio-grid {
    display: grid; /* Uses CSS Grid for a powerful, responsive layout */
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* Auto-fits items, min 350px wide, max 1fr of available space */
    gap: 40px; /* Space between grid items */
    margin-top: 60px;
}

.portfolio-item {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); /* More noticeable shadow */
    overflow: hidden; /* Hides content outside the rounded corners */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth effects on hover */
    text-align: left; /* Text aligns left within each project box */
}

.portfolio-item:hover {
    transform: translateY(-8px); /* Lifts the box slightly */
    box-shadow: 0 15px 40px rgba(0,0,0,0.15); /* Stronger shadow on hover */
}

.portfolio-item img {
    width: 100%; /* Image fills its container */
    height: 280px; /* Fixed height for consistent look */
    object-fit: cover; /* Crops image to fit without distortion */
    display: block; /* Removes extra space below image */
    border-bottom: 1px solid #eee;
}

.portfolio-item h3 {
    margin: 25px 25px 10px;
    color: #333;
    font-size: 1.8em;
}

.portfolio-item p {
    font-size: 1em;
    color: #777;
    margin: 0 25px 25px;
    line-height: 1.6;
}

.portfolio-item .btn-small {
    margin: 0 25px 25px; /* Position the button */
}

/* Contact Section Styling: The form and contact info */
#contact form {
    max-width: 650px;
    margin: 50px auto 0 auto;
    display: flex;
    flex-direction: column; /* Stacks form elements vertically */
    gap: 25px; /* Space between form elements */
}

#contact form input[type="text"],
#contact form input[type="email"],
#contact form textarea {
    width: 100%;
    padding: 18px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1.1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#contact form input[type="text"]:focus, /* What happens when you click on the input field */
#contact form input[type="email"]:focus,
#contact form textarea:focus {
    border-color: #9B7B61;
    box-shadow: 0 0 0 3px rgba(155, 123, 97, 0.2); /* Subtle glow */
    outline: none; /* Removes default ugly browser outline */
}

#contact form button {
    padding: 18px 40px;
    font-size: 1.2em;
    align-self: center; /* Centers the button horizontally */
}

.social-links {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 25px;
}

.social-links a {
    font-size: 1.2em;
    color: #9B7B61;
    font-weight: 600;
}

/* Footer Styling: The bottom part of the page */
footer {
    background: #222; /* Dark background */
    color: #bbb; /* Light gray text */
    padding: 40px 0;
    font-size: 0.95em;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

footer p {
    margin: 0;
}

.footer-social a {
    color: #fff;
    margin-left: 20px;
    opacity: 0.7; /* Slightly faded */
    transition: opacity 0.3s ease;
}

.footer-social a:hover {
    opacity: 1; /* Fully visible on hover */
    text-decoration: none;
}

/* --- Media Queries for Responsiveness: Makes your site look good on all devices! --- */

/* Tablets (e.g., up to 1024px wide) */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    #hero h1 {
        font-size: 3.5em;
    }

    #hero p {
        font-size: 1.4em;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }
}

/* Smaller Tablets & Large Phones (e.g., up to 768px wide) */
@media (max-width: 768px) {
    header .container {
        flex-direction: column; /* Stacks logo and nav vertically */
        text-align: center;
    }

    header nav ul {
        margin-top: 20px;
        display: flex;
        justify-content: center;
        flex-wrap: wrap; /* Allows nav items to wrap */
    }

    header nav ul li {
        margin: 0 15px 10px; /* Adjust spacing and add bottom margin for wrapping */
    }

    section {
        padding: 70px 0;
    }

    #hero {
        min-height: 450px;
    }
    #hero h1 {
        font-size: 2.8em;
    }
    #hero p {
        font-size: 1.1em;
    }

    #about .profile-img {
        width: 200px;
        height: 200px;
        margin: 0 auto 30px auto;
    }

    #about p {
        font-size: 1em;
        max-width: 90%;
    }

    .portfolio-item h3 {
        font-size: 1.5em;
    }

    .portfolio-item p {
        font-size: 0.9em;
    }

    footer .container {
        flex-direction: column;
        gap: 15px;
    }
    .footer-social a {
        margin: 0 10px;
    }
}



/* --- Project Detail Page Specific Styles --- */
.project-detail-page {
    padding: 80px 0; /* Adjust top padding to clear header */
    line-height: 1.6;
    color: #555;
}

.project-detail-page h1 {
    font-family: 'Playfair Display', serif;
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.project-detail-page .project-intro {
    font-style: italic;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}


.detail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.detail-gallery img {
    width: 900%; /* Ensures image takes full width of its grid column */
    height: auto; /* IMPORTANT: Allows image to maintain its original aspect ratio */
    object-fit: contain; /* Ensures the entire image is visible, no cropping, may leave empty space */
    display: block; /* Removes any extra space below the image */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.project-description h3 {
    font-family: 'Playfair Display', serif;
    color: #333;
    margin-top: 30px;
    margin-bottom: 10px;
}

.project-description p {
    margin-bottom: 15px;
}

.project-detail-page .btn {
    display: block;
    width: fit-content;
    margin: 40px auto 0;
    padding: 12px 25px;
    background-color: #A0B9BA; /* Example button color */
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.project-detail-page .btn:hover {
    background-color: #8C9F9F;
}

/* --- Media Queries for Responsiveness --- */

/* Tablets (e.g., up to 1024px wide) */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    #hero h1 {
        font-size: 3.5em;
    }

    #hero p {
        font-size: 1.4em;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }
}

/* Smaller Tablets & Large Phones (e.g., up to 768px wide) */
@media (max-width: 768px) {
    header .container {
        flex-direction: column; /* Stacks logo and nav vertically */
        text-align: center;
    }

    header nav ul {
        margin-top: 20px;
        display: flex;
        justify-content: center;
        flex-wrap: wrap; /* Allows nav items to wrap */
    }

    header nav ul li {
        margin: 0 15px 10px; /* Adjust spacing and add bottom margin for wrapping */
    }

    section {
        padding: 70px 0;
    }

    #hero {
        min-height: 450px;
    }
    #hero h1 {
        font-size: 2.8em;
    }
    #hero p {
        font-size: 1.1em;
    }

    #hero img { /* Specific adjustment for the ZR Design logo on tablets/phones */
        max-width: 250px; /* Smaller for mobile/tablet screens */
        margin-bottom: 15px;
    }

    #about .profile-img { /* Specific adjustment for the profile picture on tablets/phones */
        max-width: 200px; /* Smaller for mobile/tablet screens */
        height: auto;
        margin: 0 auto 30px auto; /* Ensure centering */
    }

    #about p {
        font-size: 1em;
        max-width: 90%;
    }

    .portfolio-item h3 {
        font-size: 1.5em;
    }

    .portfolio-item p {
        font-size: 0.9em;
    }

    footer .container {
        flex-direction: column;
        gap: 15px;
    }
    .footer-social a {
        margin: 0 10px;
    }

    /* Project Detail Gallery adjustments for tablets/larger phones */
    .detail-gallery {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 15px;
        padding: 0 15px;
    }

    /* Project Detail Page container padding */
    .project-detail-page .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Mobile Phones (e.g., up to 480px wide) */
@media (max-width: 480px) {
    header .logo {
        font-size: 1.8em;
    }

    header nav ul li {
        margin: 0 10px 10px;
    }

    #hero {
        padding: 50px 0;
    }
    #hero h1 {
        font-size: 2.2em;
    }
    #hero p {
        font-size: 0.95em;
    }

    h2 {
        font-size: 2em;
    }

    /* Ensure portfolio grid goes to single column on small phones */
    .portfolio-grid {
        grid-template-columns: 1fr; /* Single column layout for mobiles */
        gap: 25px;
    }

    .portfolio-item {
        margin: 0 10px; /* Add horizontal margin to items */
    }

    #contact form {
        padding: 0 15px;
    }

    #contact form button {
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    .social-links {
        flex-direction: column;
        gap: 10px;
    }

    /* Project Detail Gallery adjustments for very small phones */
    .detail-gallery {
        grid-template-columns: 1fr; /* Force single column */
        gap: 10px;
        padding: 0 10px;
    }

    /* Project Detail Page container padding for very small screens */
    .project-detail-page .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

