/*
Theme Name: Personal Portfolio Website Theme
Theme URI: https://piyushkulkarni.com/
Author: Piyush Kulkarni
Author URI: https://piyushkulkarni.com/
Description: A custom responsive theme for a personal portfolio. Version 5 improves the footer and mobile carousel functionality.
Version: 5.0
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;
    background-color: #f0f0f0;
}

*, *: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;
}

.site-title {
    font-size: 1.8em;
    margin: 0;
    font-weight: bold;
    color: #fff;
}
.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 a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 0;
    display: block;
}
.main-navigation .current-menu-item > a,
.main-navigation a:hover {
    color: #FDF5E6;
    text-decoration: underline;
}

/* --- Main Content Area --- */
.site-main {
    background-color: rgba(253, 245, 230, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    max-width: 1100px;
    margin: 0 auto;
    min-height: 65vh;
    border-radius: 8px;
    width: calc(100% - 30px);
    position: relative;
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.customizable-content {
    color: #333;
}

/* --- Footer (V5 UPDATE) --- */
#colophon {
    /* Changed from transparent to a light beige */
    background-color: #FDF5E6;
    /* Reduced padding to make it "thinner" */
    padding: 20px 0;
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 5;
    margin-top: 40px; /* Add some space above the footer */
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05); /* Subtle shadow */
}

.site-info {
    font-size: 0.9em;
    /* Changed from white to black */
    color: #333;
    font-weight: bold;
    /* Removed text shadow */
}

.ai-credit {
    font-size: 0.8em;
    /* Changed from light to a darker grey */
    color: #555;
    margin-top: 8px;
    /* Removed text shadow */
}


/* --- Responsive Download Buttons --- */
.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;
    text-align: center;
}
.download-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}
.download-button img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    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;
}


/* --- Carousel --- */
.carousel-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.carousel-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    /* V5 FIX: Add this for swipe functionality */
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10+ */
    user-select: none;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    /* V5 FIX: Add this to allow grabbing */
    cursor: grab;
}
.carousel-track.grabbing {
    cursor: grabbing;
}


.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.slide-image {
    width: 100%;
    max-width: 400px;
}

.slide-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.slide-text {
    text-align: center;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    color: #333;
    font-size: 24px;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transition: background-color 0.3s ease, opacity 0.3s ease;
}
.carousel-nav:hover {
    background-color: white;
}
.carousel-nav.prev {
    left: 10px;
}
.carousel-nav.next {
    right: 10px;
}


/* --- Lightbox/Zoom Modal --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox-overlay.visible {
    opacity: 1;
    visibility: visible;
}
.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 80%;
}
.lightbox-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* --- Animated & AI Slides --- */
.slide-media { width: 100%; max-width: 400px; aspect-ratio: 1 / 1; flex-shrink: 0; }
.slide-media-video { background-color: #000; border-radius: 5px; overflow: hidden; }
.slide-media-video video { width: 100%; height: 100%; object-fit: cover; }
.slide-media-animated img { animation: pulse 2.5s infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); box-shadow: 0 4px 10px rgba(0,0,0,0.1); } 50% { transform: scale(1.03); box-shadow: 0 6px 20px rgba(0,0,0,0.15); } }
.flip-card { background-color: transparent; perspective: 1000px; }
.flip-card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.7s; transform-style: preserve-3d; box-shadow: 0 4px 10px rgba(0,0,0,0.1); border-radius: 5px; }
.flip-card:hover .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back { position: absolute; width: 100%; height: 100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: 5px; overflow: hidden; }
.flip-card-front img { width: 100%; height: 100%; object-fit: cover; }
.flip-card-back { background-color: #333; color: white; transform: rotateY(180deg); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; text-align: center; }
.gemini-generator-container .gemini-input-group { margin: 15px 0; text-align: left; }
.gemini-generator-container label { display: block; font-size: 0.9em; color: #555; margin-bottom: 5px; }
.gemini-generator-container .gemini-keywords-input { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 1em; font-family: 'Merriweather', serif; }
.gemini-generate-button { background-color: #1a73e8; color: white; border: none; padding: 10px 15px; border-radius: 4px; font-weight: bold; cursor: pointer; transition: background-color 0.3s ease, opacity 0.3s ease; margin-bottom: 15px; }
.gemini-generate-button:hover { background-color: #1765cc; }
.gemini-generate-button.loading { opacity: 0.7; cursor: wait; }
.gemini-generator-container .project-description { background-color: #f0f0f0; border-left: 4px solid #1a73e8; padding: 10px; border-radius: 4px; min-height: 50px; text-align: left; transition: background-color 0.3s ease; }

/* --- Responsiveness --- */
@media (min-width: 768px) {
    .carousel-slide { flex-direction: row; text-align: left; }
    .slide-media { width: 40%; }
    .slide-text { width: 60%; text-align: left; }
}

@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;
    }
    .carousel-slide { padding: 0 5px; }
    /* V5 FIX: Hide the navigation buttons on small screens since swipe is now the primary interaction method. */
    .carousel-nav {
       display: none;
    }
}

/* 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; }
