/* showcase_styles.css */

/* --- Global Resets and Base Styles --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --- Theme Variables --- */
/* Theme 7: Regal Sapphire & Gold - Light Mode */
:root {
    --bg-color: #fdfcf7; /* Ivory/Off-white */
    --text-color: #2c3e50; /* Dark Slate Blue/Grey */
    --primary-accent-color: #0033a0; /* Deep Sapphire Blue */
    --secondary-accent-color: #daa520; /* Goldenrod (Gold accent) */
    --card-bg-color: #ffffff;
    --border-color: #e0e7ef; /* Light blueish grey */
    --link-color: var(--primary-accent-color);
    --link-hover-color: #002269; /* Darker Sapphire */
    --nav-bg-color: #f0f4f8; /* Very light blue-grey */
    --footer-bg-color: #1d2939; /* Dark Navy/Charcoal */
    --footer-text-color: #fdfcf7;
    --transition-speed: 0.3s;
}

/* Theme 7: Regal Sapphire & Gold - Dark Mode */
body.dark-mode {
    --bg-color: #0a192f; /* Very Dark Navy Blue */
    --text-color: #e0e7ef; /* Light Steel Blue */
    --primary-accent-color: #4169e1; /* Royal Blue (brighter for dark mode) */
    --secondary-accent-color: #ffd700; /* Brighter Gold */
    --card-bg-color: #172a46; /* Dark Blue for cards */
    --border-color: #3a506b; /* Muted Dark Blue border */
    --link-color: var(--primary-accent-color);
    --link-hover-color: #6495ed; /* Cornflower Blue (lighter for hover) */
    --nav-bg-color: #172a46;
    --footer-bg-color: #030c17; /* Nearly Black-Blue */
    --footer-text-color: #e0e7ef;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.7;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
    font-size: 16px;
}

.hero-container h1, .showcase-category h2, .card-content h3 {
    font-family: 'Montserrat', sans-serif; /* Or keep Montserrat, or choose another heading font */
    font-weight: 600; /* Example weight */
}

/* --- Utility Classes --- */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- Navigation Bar --- */
.showcase-nav {
    background-color: var(--nav-bg-color);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

.back-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-speed) ease;
}

.back-link:hover {
    color: var(--primary-accent-color);
}

.theme-btn {
    background: none;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    padding: 0.5rem 0.75rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.theme-btn:hover {
    background-color: var(--text-color);
    color: var(--bg-color); /* Invert colors on hover */
}

/* --- Hero Section --- */
.showcase-hero {
    background-color: var(--card-bg-color); /* Slightly different from main bg for emphasis */
    /* padding: 3rem 0; */
	padding: 4rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.hero-container h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-accent-color);
    font-weight: 600;
}

.hero-container .subtitle {
    font-size: 1.2rem;
    color: var(--secondary-accent-color);
    font-weight: 300;
}

/* --- Main Content Area --- */
.showcase-content {
    padding: 2.5rem 0;
}

.content-container section {
    background-color: var(--card-bg-color);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    border: 1px solid var(--border-color);
    transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.content-container h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-accent-color);
    border-bottom: 2px solid var(--primary-accent-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.content-container h3 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.content-container p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Project Specifics */
.visual-gallery .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.visual-gallery img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease-in-out;
}
.visual-gallery img:hover {
    transform: scale(1.03);
}


.technologies-used ul {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.technologies-used li span {
    background-color: var(--bg-color);
    color: var(--secondary-accent-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.btn-link {
    display: inline-block;
    background-color: var(--primary-accent-color);
    color: var(--card-bg-color); /* Text color that contrasts with button bg */
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem; /* For wrapping */
    transition: background-color var(--transition-speed) ease, transform 0.2s ease;
}

.btn-link:hover {
    background-color: var(--link-hover-color);
    transform: translateY(-2px);
}

.btn-link i {
    margin-left: 0.5rem;
}

/* Story Specifics */
.story-display .story-cover {
    margin: 0 auto 1.5rem auto;
    text-align: center;
    max-width: 600px;
}

.story-display .story-cover img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.story-display .story-cover figcaption {
    font-size: 0.9rem;
    color: var(--secondary-accent-color);
    font-style: italic;
}

.story-text {
    font-family: 'Lora', serif; /* Serif for story text */
    font-size: 1.1rem;
    line-height: 1.9;
    text-align: justify;
}

.story-text p {
    margin-bottom: 1.2rem;
}
/* Styles for the main category sections (Hobby Projects, Writings, etc.) */
.showcase-category {
    /* This style was previously on .content-container section */
    /* We can keep it or adjust if cards have their own background */
    background-color: transparent; /* Let cards have their own background if distinct */
    padding: 2rem 0; /* Adjusted padding if cards will have their own */
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color); /* Optional: separator for categories */
}

.showcase-category:last-child {
    border-bottom: none; /* No border for the last category */
}

.showcase-category h2 {
    font-size: 2rem; /* Slightly larger category titles */
    margin-bottom: 2rem; /* Increased space below category title */
    color: var(--primary-accent-color);
    /* border-bottom: 2px solid var(--primary-accent-color); */ /* Kept from before */
    /* padding-bottom: 0.5rem; */ /* Kept from before */
    /* display: inline-block; */ /* Kept from before */
    text-align: left; /* Align category titles to the left */
}
.showcase-category h2 i {
    margin-right: 0.75rem;
}

.showcase-section-nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
    gap: 1.5rem; /* Adjust gap as needed */
    /* This will try to center the links if there's space */
    flex-grow: 1; /* Allows this to take up space */
    justify-content: center; /* Centers the links within their available space */
}

.showcase-section-nav-links li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0.5rem; /* Small padding for easier clicking */
    position: relative; /* For the underline effect */
    transition: color var(--transition-speed) ease;
}

/* Underline effect for hover and active states */
.showcase-section-nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -2px; /* Position the line slightly below the text */
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-accent-color);
    transition: width var(--transition-speed) ease;
}

.showcase-section-nav-links li a:hover,
.showcase-section-nav-links li a.active-link { /* Class to be added by JavaScript */
    color: var(--primary-accent-color);
}

.showcase-section-nav-links li a:hover::after,
.showcase-section-nav-links li a.active-link::after {
    width: 100%; /* Show full underline */
}

/* Grid for Item Cards */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive columns */
    gap: 2rem; /* Space between cards */
}

/* Individual Item Card Styling */
.item-card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px; /* Softer, more modern radius */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08); /* Softer shadow */
    display: flex;
    flex-direction: column; /* Stack image, content, links vertically */
    overflow: hidden; /* Ensures child elements don't break border-radius */
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
	border-left: 4px solid var(--primary-accent-color);
}

.item-card:hover {
    transform: translateY(-5px); /* Subtle lift on hover */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12); /* Enhanced shadow on hover */
}

/* Card Image Container */
.card-image-container {
    width: 100%;
    height: 200px; /* Fixed height for consistency, or use aspect-ratio */
    overflow: hidden;
    background-color: var(--secondary-accent-color); /* Placeholder bg if image is missing */
}

.card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover ensures the image fills the container, might crop */
    /* object-fit: contain; */ /* Contain ensures image is fully visible, might leave space */
    transition: transform 0.4s ease;
}

.item-card:hover .card-image-container img {
    transform: scale(1.05); /* Slight zoom on image on card hover */
}

/* Card Content Area */
.card-content {
    padding: 1.5rem;
    flex-grow: 1; /* Allows content to take available space, pushing links down */
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.3rem; /* Card title size */
    margin-top: 0; /* Reset from generic h3 style if needed */
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.item-description {
    font-size: 0.95rem;
    color: var(--text-color); /* Ensure good contrast */
    opacity: 0.85;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1; /* Pushes tech tags and links to the bottom if description is short */
}

/* Technologies used inside cards */
.item-card .technologies-used { /* Specific to cards */
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem; /* Space before links */
}

.item-card .technologies-used span {
    background-color: var(--bg-color); /* Contrast with card background */
    color: var(--secondary-accent-color);
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

/* Links/Buttons inside cards */
.item-links {
    margin-top: auto; /* Pushes links to the bottom of the card content area */
    padding-top: 0.5rem; /* Small space above links if description fills space */
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller cards/screens */
    gap: 0.75rem; /* Space between buttons */
}

.item-card .btn-link { /* Styles for buttons specifically within cards */
    /* display: inline-block; */ /* Already set */
    /* background-color: var(--primary-accent-color); */ /* Already set */
    /* color: var(--card-bg-color); */ /* Should be a color that contrasts with button, like white/light gray */
    color: #ffffff; /* Explicitly white for better contrast on blue button */
    /* padding: 0.75rem 1.5rem; */ /* Already set */
    /* text-decoration: none; */ /* Already set */
    /* border-radius: 5px; */ /* Already set */
    /* font-weight: 500; */ /* Already set */
    /* margin-right: 0.5rem; */ /* Handled by gap in .item-links now */
    /* margin-bottom: 0.5rem; */ /* Handled by gap in .item-links now */
    /* transition: background-color var(--transition-speed) ease, transform 0.2s ease; */ /* Already set */
    font-size: 0.9rem;
    flex-grow: 1; /* Allow buttons to grow if only one, or share space */
    text-align: center;
}
.item-card .btn-link.github-link {
    background-color: var(--secondary-accent-color);
    color: var(--bg-color); /* Text color that contrasts with this button's bg */
}
.item-card .btn-link.github-link:hover {
    background-color: var(--text-color); /* Darken on hover */
    color: var(--bg-color);
}
/* --- Footer --- */
.showcase-footer {
    background-color: var(--footer-bg-color);
    color: var(--footer-text-color);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.showcase-footer a {
    color: var(--primary-accent-color); /* Use accent for links in footer too */
    text-decoration: none;
}

.showcase-footer a:hover {
    text-decoration: underline;
}

.scroll-top-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: var(--primary-accent-color);
    color: var(--card-bg-color); /* Text color that contrasts with button bg */
    /* Use a color that works for both light and dark themes for the icon, or adjust with theme */
    /* For example, if primary-accent-color is blue, white text/icon is good */
    width: 50px;
    height: 50px;
    border-radius: 50%; /* Makes it circular */
    border: none;
    font-size: 1.5rem; /* Size of the arrow icon */
    text-align: center;
    line-height: 50px; /* Vertically center icon (if needed, depends on icon) */
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px); /* Start slightly offset for a subtle appear animation */
    transition: opacity var(--transition-speed) ease,
                visibility var(--transition-speed) ease,
                transform var(--transition-speed) ease,
                background-color var(--transition-speed) ease;
    z-index: 1000; /* Ensure it's above most other content */
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.scroll-top-btn:hover {
    background-color: var(--link-hover-color); /* Darken/lighten on hover */
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0); /* Bring to final position */
}

/* Adjustments for dark mode for the icon if needed, though white usually works on blue */
body.dark-mode .scroll-top-btn {
    /* If --card-bg-color in dark mode is very dark, this color should be light */
    color: #ffffff; /* Ensuring icon is white in dark mode if card-bg changes drastically */
}
body.dark-mode .scroll-top-btn:hover {
     background-color: var(--link-hover-color); /* Ensure hover color is appropriate for dark mode */
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .hero-container h1 {
        font-size: 2rem;
    }
    .hero-container .subtitle {
        font-size: 1rem;
    }
    .content-container h2 {
        font-size: 1.6rem;
    }
    .content-container h3 {
        font-size: 1.2rem;
    }
    .theme-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }
	.showcase-section-nav-links {
        gap: 1rem; /* Reduce gap on smaller screens */
        /* You might want to hide these links or move them to a burger menu on very small screens */
        /* For now, they'll just take up space */
    }
    .showcase-section-nav-links li a {
        font-size: 0.9rem; /* Slightly smaller font */
    }
     .nav-container { /* Allow wrapping if space is tight */
        flex-wrap: wrap;
        justify-content: center; /* Center items when they wrap */
    }
    .showcase-section-nav-links {
        order: 1; /* Puts nav links below back link/theme switcher if they wrap */
        width: 100%; /* Take full width when wrapped */
        margin-top: 0.5rem; /* Add some space when wrapped */
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    .hero-container h1 {
        font-size: 1.8rem;
    }
    .nav-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    .back-link {
        margin-bottom: 0.5rem;
    }
    .btn-link {
        width: 100%;
        text-align: center;
        margin-right: 0; /* Full width on mobile */
    }
}