/*
Theme Name: Personal Portfolio Website Theme
Theme URI: https://example.com/personal-portfolio-theme/
Author: Your Name
Author URI: https://example.com/
Description: A custom responsive theme based on the provided layout.
Version: 3.1 // Incremented version //
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: responsive-layout, custom-background, custom-menu, custom-logo
Text Domain: myresponsivetheme
AI Assistance: Portions of this theme were generated or modified with assistance from Google's Gemini.
*/

/* --- Basic Reset & Body --- */
body {
    margin: 0;
    padding: 0;
    font-family: 'Merriweather', serif;
    color: #333;
}

*, *:before, *:after {
    box-sizing: border-box;
}

/* --- Links --- */
a {
    color: #E87A2E;
    text-decoration: none;
}
a:hover, a:focus {
    text-decoration: underline;
}

/* --- Layout Containers --- */
#page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(to bottom, #E87A2E, #54367D);
    background-attachment: fixed;
}

#content {
    flex: 1 0 auto;
    padding: 40px 0;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
}

/* --- Header --- */
#masthead {
    background: transparent;
    padding: 20px 0;
    color: #fff;
    position: relative;
    z-index: 1000;
}

#masthead .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-branding {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 15px;
}

.custom-logo-link img {
    max-height: 60px;
    width: auto;
    display: block;
    background-color: transparent;
    padding: 0;
    margin: 0;
}

.site-title {
    font-size: 1.8em;
    margin: 0;
    font-weight: bold;
    background-color: transparent;
    color: #fff;
    padding: 0;
    line-height: 1.2;
}
.site-title a {
    color: inherit;
    text-decoration: none;
}

/* --- Mobile Menu Toggle Button --- */
.menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #fff;
    color: #54367D;
    padding: 8px 12px;
    font-size: 1em;
    border-radius: 4px;
    cursor: pointer;
    margin-left: auto;
}
.menu-toggle:hover {
    background: white;
}
.menu-toggle svg {
    display: block;
    width: 1.2em;
    height: 1.2em;
    flex-shrink: 0;
}

/* --- Navigation --- */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.main-navigation li {
    margin-left: 20px;
}
.main-navigation li:first-child {
    margin-left: 0;
}

.main-navigation a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 0;
    display: block;
}
.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item > a {
    color: #FDF5E6;
    text-decoration: underline;
}

/* --- Main Content Area --- */
.site-main {
    background-color: #FDF5E6;
    padding: 30px;
    max-width: 1100px;
    margin: 0 auto;
    min-height: 65vh;
    border-radius: 5px;
    width: calc(100% - 30px);
    position: relative;
    z-index: 5;
}

.customizable-content {
    color: #333;
}

/* --- Footer --- */
#colophon {
    background: transparent;
    padding: 30px 0;
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 5;
}
.footer-content { }
.site-info {
    font-size: 0.9em;
    color: #1a1a1a;
    font-weight: bold;
}
.linkedin-icon {
    margin-bottom: 15px;
}
.linkedin-icon a {
    display: inline-block;
    background-color: white;
    color: #0077B5;
    padding: 8px 12px;
    border-radius: 3px;
    font-weight: bold;
}
.linkedin-icon a:hover {
    background-color: #eee;
    text-decoration: none;
}
.ai-credit {
    font-size: 0.8em;
    color: rgba(0, 0, 0, 0.7); /* A slightly lighter black */
    margin-top: 8px;
}

/* --- Responsive Download Buttons (CORRECTED) --- */
.download-buttons-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
    flex-wrap: wrap;
}
.download-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #444;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 180px; /* KEY FIX: Gives the button a stable width */
    text-align: center; /* Ensures the text below centers properly */
}
.download-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}
.download-button img {
    width: 100%; /* KEY FIX: Image fills its parent container */
    height: auto; /* Let height adjust to keep aspect ratio */
    aspect-ratio: 1 / 1; /* Enforces a square shape for the image space */
    object-fit: cover; /* Covers the area without distortion */
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.download-button span {
    font-weight: bold;
    font-size: 1.1em;
}

/* --- Responsiveness --- */
@media (max-width: 992px) {
    .menu-toggle { display: inline-flex; align-items: center; gap: 8px; }
    #site-navigation { order: 3; width: 100%; margin-left: 0; display: none; position: absolute; top: 100%; left: 0; right: 0; background: rgba(84, 54, 125, 0.98); padding: 15px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); z-index: 999; }
    #site-navigation.toggled { display: block; }
    .main-navigation ul { flex-direction: column; align-items: center; }
    .main-navigation li { margin: 8px 0; margin-left: 0; width: 100%; }
    .main-navigation a { padding: 10px; width: 100%; text-align: center; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
    .main-navigation li:last-child a { border-bottom: none; }
    .site-main { padding: 20px; width: calc(100% - 20px); }
}

@media (max-width: 767px) {
    .site-main { min-height: 50vh; }
    .download-buttons-container {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }
    /* No longer need to resize the image here, the parent button's width is sufficient */
}

/* Screen Reader Text accessibility */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
