/* --------------------------------------------------------------------------
* GLOBAL & SCROLL FIXES
* -------------------------------------------------------------------------- */
html {
    overflow: hidden;
    height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ede7f6;
    color: #4527a0;
    transition: overflow 0.3s;
}

main {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-scroll-snap-type: y mandatory;
    -ms-scroll-snap-type: y mandatory;
    background-color: #ede7f6;
}

html,
body {
    overflow: hidden;
    height: 100%;
}

/* --------------------------------------------------------------------------
* HEADER AND NAVIGATION
* -------------------------------------------------------------------------- */
header {
    background-color: #764ba2;
    color: white;
    padding: 10px 5%; /* Using % for better horizontal scaling */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed; /* Fixed is more reliable than sticky for capstone projects */
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    box-sizing: border-box; /* Prevents padding from breaking 100% width */
}

header h1 {
    margin: 0;
    font-size: 24px;
    white-space: nowrap; /* Prevents title from breaking into 2 lines */
}
.nav-container {
    display: flex;
    align-items: center;
}

/* --- Desktop Nav Links --- */
nav.portfolio-links a {
    color: white;
    text-decoration: none;
    margin-left: 25px;
    font-weight: 600;
    transition: color 0.3s, border-bottom 0.3s;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

nav.portfolio-links a:hover,
nav.portfolio-links a.active {
    color: #ede7f6;
    border-bottom: 2px solid #ede7f6;
}

/* --- Auth Links --- */
.auth-links {
    margin-left: 30px;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
}

.auth-links a {
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid white;
    border-radius: 5px;
    font-size: 0.8em; /* Smaller buttons for better fit */
    white-space: nowrap;
    transition: background-color 0.3s;
}

.auth-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* --- Mobile Menu Button (Hidden by default) --- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
* HOME SECTION (MPMS Summary & Carousel) - SPACE REDUCTION APPLIED
* -------------------------------------------------------------------------- */
#home-system-about {
    position: relative;
    background-color: #5e35b1;
    overflow: hidden;

    color: white;
    text-align: center;
    padding: 40px 20px 60px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* LARGE (4) AND MEDIUM (5) SQUARES (On the Left) */
#home-system-about::before {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;

    top: 5%;
    left: -30px;

    /* We use box-shadow to create both Large AND Medium squares */
    box-shadow: 
        /* The 3 other Large Clones */ 60px 300px 0 0
            rgba(255, 255, 255, 0.05),
        -20px 600px 0 10px rgba(255, 255, 255, 0.04),
        80px 850px 0 -20px rgba(255, 255, 255, 0.06),
        /* The 5 Medium Clones (Notice the negative spread '-40px' to make them medium) */
            120px 150px 0 -40px rgba(255, 255, 255, 0.08),
        30px 450px 0 -35px rgba(255, 255, 255, 0.07),
        100px 550px 0 -45px rgba(255, 255, 255, 0.09),
        -10px 750px 0 -40px rgba(255, 255, 255, 0.06),
        50px 950px 0 -35px rgba(255, 255, 255, 0.08);

    z-index: 1;
    animation: floatSlow 12s infinite ease-in-out;
}

/* 6 SMALL SQUARES (On the Left) */
#home-system-about::after {
    content: "";
    position: absolute;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 6px;

    top: 20%;
    left: 12%;

    box-shadow: -40px 150px 0 0 rgba(255, 255, 255, 0.1),
        100px 400px 0 0 rgba(255, 255, 255, 0.08),
        -10px 550px 0 0 rgba(255, 255, 255, 0.15),
        70px 750px 0 0 rgba(255, 255, 255, 0.1),
        -30px 950px 0 0 rgba(255, 255, 255, 0.07);

    z-index: 1;
    animation: floatFast 7s infinite ease-in-out;
}

/* Animations */
@keyframes floatSlow {
    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(25px, -35px) rotate(10deg);
    }
}

@keyframes floatFast {
    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(-15px, -50px) rotate(-15deg);
    }
}

#home-system-about h2,
#home-system-about p {
    position: relative;
    z-index: 2;
}

/* FIX: Two-Column Flex Container for side-by-side */
.home-content-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 10px auto 0 auto;
    gap: 3%;
    box-sizing: border-box;
}

/* Left Column: Summary Paragraph */
.summary-box {
    width: 45%;
    max-width: 500px;
    text-align: left;
    margin-top: 10px;
    box-sizing: border-box;
}

/* New Title Style */
.summary-box h3 {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 15px;
    color: white;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.summary-box p {
    font-size: 1.1em;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 0;
}

/* Right Column: Carousel Outer Wrapper */
.carousel-outer-wrapper {
    width: 52%;
    max-width: 700px;
    position: relative;
    box-sizing: border-box;
}

/* --- CAROUSEL STYLES (COVER FLOW EFFECT) --- */
.carousel-wrapper {
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    height: 380px;
}

.carousel-inner {
    display: flex;
    width: fit-content;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    position: relative;
    justify-content: flex-start;
    align-items: center;
}

/* Item width: 500px, Margin: 20px left/right. Total: 540px */
.carousel-item {
    width: 500px;
    height: 320px;
    margin: 0 20px;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out,
        box-shadow 0.3s;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 20px;
    opacity: 0.5;
    color: black;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    transform: scale(0.85);
    box-sizing: border-box;
}

.carousel-item-content {
    z-index: 5;
    text-align: left;
    padding: 10px 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 70%);
    width: 100%;
    box-sizing: border-box;
}

.carousel-item h3 {
    margin: 0;
    font-size: 1.8em;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    word-wrap: break-word;
}

.carousel-item p {
    font-size: 1em;
    margin-top: 5px;
    color: #f0f0f0;
    word-wrap: break-word;
}

/* Center Slide Styles */
.carousel-item.center {
    transform: scale(1.1) translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    opacity: 1;
    z-index: 10;
}

/* Left/Right Control Buttons - Positioned relative to the carousel-outer-wrapper */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    z-index: 20;
    font-size: 1.5em;
    transition: background 0.3s;
    border-radius: 50%;
}

.carousel-control:hover {
    background: rgba(0, 0, 0, 0.8);
}

#prev-slide {
    left: -10px;
}

#next-slide {
    right: -10px;
}

/* Button Grouping (Below Carousel Wrapper) */
.action-buttons-group {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Smaller Button Styles */
.youtube-button,
.team-pawix-button,
.booklet-button {
    padding: 12px 25px;
    font-size: 1em;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    border-radius: 5px;
    box-sizing: border-box;
    text-align: center;
}

.youtube-button {
    background-color: #ff0000;
    color: white;
    border-radius: 5px;
}

.youtube-button:hover {
    background-color: #cc0000;
    transform: translateY(-2px);
}

.team-pawix-button {
    background-color: #ede7f6;
    color: #5e35b1;
    border: none;
    border-radius: 50px;
}

.team-pawix-button:hover {
    background-color: #b39ddb;
    transform: translateY(-2px);
}

/* NEW: Booklet Button Style */
.booklet-button {
    background-color: #4caf50;
    color: white;
    border: none;
}

.booklet-button:hover {
    background-color: #388e3c;
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
* ABOUT SECTION (TEAM PAWIX) - MODIFIED FOR LEFT-SIDE IMAGE
* -------------------------------------------------------------------------- */
#about-team-pawix {
    background-color: #ede7f6;
    color: #4527a0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box;
}

/* IMPORTANT: Make content-wrapper a flex container to hold image and text side-by-side */
#about-team-pawix .content-wrapper {
    flex-direction: row;
    max-width: 1200px;
    text-align: left;
    justify-content: space-between;
    align-items: center;
    gap: 5%;
    box-sizing: border-box;
}

/* NEW: Style for the landscape image container */
.team-image-container {
    width: 45%;
    max-width: 500px;
    min-width: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.5s ease-out, box-shadow 0.5s ease-out;
    border: 5px solid white;
    box-sizing: border-box;

    /* Needed for image map to align correctly */
    position: relative;
}

/* Hover effect for the image container */
.team-image-container:hover {
    transform: translateY(-10px) rotate(1deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* NEW CSS for the <img> tag inside the container */
.team-landscape-img-tag {
    width: 100%;
    height: 300px;
    display: block;
    object-fit: cover;
}

/* Image map area pointer */
.team-image-container map area {
    cursor: pointer;
}

/* **************************************************************************
        * CUSTOM TOOLTIP (COMIC CLOUD) STYLES
        * **************************************************************************/
.map-tooltip {
    position: fixed;
    z-index: 10000;
    background-color: white;
    color: #4527a0;
    padding: 8px 12px;
    border: 2px solid #4527a0;
    border-radius: 15px;
    font-size: 1em;
    font-weight: bold;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
    white-space: nowrap;
    pointer-events: none;
    /* Allows clicks to pass through to elements beneath */
}

/* Create the triangular tail/point (OUTER BORDER) */
.map-tooltip::before {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border: 11px solid transparent;
    /* Larger border for the dark outline */
    border-top-color: #4527a0;
    bottom: -21px;
    /* Positions the tail below the box */
    left: 50%;
    transform: translateX(-50%);
}

/* Create the white triangle (INNER FILL) */
.map-tooltip::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    /* Smaller border for the white fill */
    border-top-color: white;
    bottom: -18px;
    /* Offset to sit inside the dark border */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    /* Must be above ::before but below the main box content */
}

.map-tooltip.active {
    visibility: visible;
    opacity: 1;
}

/* **************************************************************************
        * END CUSTOM TOOLTIP STYLES
        * **************************************************************************/

/* NEW: Style for the text content */
.team-text-content {
    width: 50%;
    max-width: 600px;
    text-align: left;
    box-sizing: border-box;
}

#about-team-pawix h2 {
    font-size: 3.5em;
    color: #4527a0;
    margin-bottom: 20px;
    text-align: left;
    word-wrap: break-word;
}

#about-team-pawix p {
    font-size: 1.2em;
    max-width: none;
    margin: 0 0 30px 0;
    line-height: 1.6;
    word-wrap: break-word;
}

/* FIX: Restoring the CTA button style within the About section */
.cta-button {
    background-color: #5e35b1;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-block;
    margin-top: 20px;
    box-sizing: border-box;
}

.cta-button:hover {
    background-color: #764ba2;
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
* PORTFOLIO SECTIONS (Team Members)
* -------------------------------------------------------------------------- */
.portfolio-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start;
    -ms-scroll-snap-align: start;
    padding: 40px 20px;
    position: relative;
    box-sizing: border-box;
}

.content-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    gap: 5%;
    box-sizing: border-box;
}

/* === 1. IMAGE CONTAINER === */
.image-container {
    position: relative;
    width: 45%;
    height: 400px;
    min-width: 300px;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
* NEW: PERPETUAL "SNAKE" LINE ANIMATION STYLES
* -------------------------------------------------------------------------- */

/* Keyframes for the continuous rotation of the pseudo-element border */
@keyframes snakeTrace {
    100% {
        /* Rotates the entire pseudo-element border 360 degrees */
        transform: rotate(360deg);
    }
}

/* 1. Modify .colored-block to hold the animation base */
.colored-block {
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 10px;
    /* Removed fixed shadow, allowing the line to be the focus */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    background: transparent;
    /* Make the block transparent to show the line */
    overflow: hidden;
    /* Hide the rotating gradient outside the block bounds */
    z-index: 1;
    /* Ensure the block is positioned relative to the parent */
    transition: none;
    /* Disable any previous transition */
}

/* 2. Create the moving line using a ::before pseudo-element */
.colored-block::before {
    content: "";
    position: absolute;
    /* Dimensions: Larger than the block to ensure the gradient covers all edges when rotating */
    width: 400%;
    height: 400%;
    /* Position the center of the pseudo-element at the center of the block */
    top: -150%;
    left: -150%;
    z-index: -1;
    /* Place it behind the inner content */

    /* Create the moving line using a conical-gradient */
    background: conic-gradient(
        from 0deg,
        /* Start with the main accent color, forming the line/head */
            var(--accent-color) 0deg,
        var(--accent-color) 45deg,
        /* Transparent area, forming the gap/tail */ transparent 45deg,
        transparent 100deg,
        /* Subtle color area for continuous transition */ var(--accent-color)
            360deg
    );

    /* Start the continuous rotation */
    animation: snakeTrace 4s linear infinite;
}

/* 3. Create the mask (inner element) to hide the rotating line's interior */
.colored-block::after {
    content: "";
    position: absolute;
    top: 5px;
    /* Define the thickness of the line */
    left: 5px;
    right: 5px;
    bottom: 5px;
    /* Use the section's background color to mask the interior of the line */
    background: #ede7f6;
    border-radius: 8px;
    /* Slightly smaller radius for a clean border look */
    z-index: 0;
    /* Place it above ::before but below the image */
}

/* 4. Ensure the image is positioned correctly */
.profile-img {
    position: absolute;
    width: 280px;
    height: auto;
    object-fit: contain;
    transition: transform 0.5s ease-out, filter 0.5s ease-out;
    filter: drop-shadow(4px 4px 10px rgba(0, 0, 0, 0.2));
    z-index: 10;
    /* Ensure image stays above all pseudo-elements */
    top: 50%;
    bottom: auto;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 5. Keep the image pop-out effect on hover */
.image-container:hover .profile-img {
    transform: translate(-50%, -50%) scale(1.05);
    filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.4));
}

/* 6. Remove previous hover glow rules (now overridden/removed) */
.image-container:hover .colored-block {
    animation: none;
    box-shadow: none;
}

/* === 2. TEXT CONTAINER (MODIFIED: Uniform "Hero" Style for All) === */
.text-container {
    width: 50%;
    padding: 40px;
    background-color: transparent;
    /* Removed white card background */
    border-radius: 15px;
    box-shadow: none;
    /* Removed box shadow */
    text-align: left;
    box-sizing: border-box;
}

/* NEW: Style for the "Hello, My Name Is" greeting */
.hero-greeting,
.hero-system-analyst .hero-greeting {
    font-size: 1.2em;
    color: #5e35b1;
    /* Darker violet for high contrast */
    margin-bottom: 5px;
    display: block;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.text-container h2 {
    margin-top: 0;
    font-size: 70px;
    /* Increased to match Morgia's size */
    color: var(--text-accent-color);
    margin-bottom: 5px;
    word-wrap: break-word;
    font-weight: 700;
    /* Made bold to match Morgia */
    /* NEW: Morgia-style appearance */
    text-transform: uppercase;
    /* All caps */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    /* Strong shadow */
}

/* The original h3 style is now obsolete as h3 tags were removed for uniformity */
.text-container h3 {
    display: none;
    /* Hide for consistency with hero layout */
}

.text-container p {
    font-size: 1.15em;
    /* Adjusted size to match Morgia's hero section */
    margin-bottom: 30px;
    color: #4527a0;
    /* Kept dark purple for contrast against light background */
    word-wrap: break-word;
    line-height: 1.6;
    font-weight: 500;
    /* Added font weight to match Morgia's */
}

/* --------------------------------------------------------------------------
* NEW: HERO STYLE OVERRIDES for System Analyst Section (Simplified/Kept for unique size)
* -------------------------------------------------------------------------- */
#system-analyst {
    background-color: #ede7f6;
    --accent-color: #764ba2;
    --text-accent-color: var(--accent-color);
}

/* Ensure content aligns well, important for the hero look */
#system-analyst .content-wrapper {
    align-items: center;
    justify-content: space-between;
}

/* 1. This rule is kept for Morgia's unique width */
.hero-system-analyst {
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: 55%;
    text-align: left !important;
}

/* 2. Greeting: Now relies on .hero-greeting global rule above */

/* 3. Style the main name: Overridden here for absolute certainty on color/size */
.hero-system-analyst h2 {
    font-size: 70px !important;
    color: var(--accent-color) !important;
    line-height: 1.1;
    margin-top: 0;
    margin-bottom: 20px;
    letter-spacing: -1px;
    /* Applying the strong shadow and uppercase explicitly for the !important rule */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
}

/* 4. Description: Overridden here for absolute certainty on color/size */
.hero-system-analyst p {
    color: #4527a0 !important;
    font-weight: 500;
    max-width: 550px;
    margin-bottom: 30px !important;
    line-height: 1.7 !important;
    font-size: 1.15em !important;
    text-align: left !important;
}

/* 5. Button styles remain unchanged */
.hero-system-analyst .view-my-work-button {
    background-color: var(--accent-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero-system-analyst .view-my-work-button:hover {
    background-color: #5e35b1;
    transform: translateY(-2px);
}

/* Image container for Morgia */
#system-analyst .image-container {
    width: 45%;
}

#system-analyst .profile-img {
    width: 260px;
}

/* --------------------------------------------------------------------------
* SCROLL ANIMATION STYLES
* -------------------------------------------------------------------------- */
.team-text-content,
.text-container,
.hero-system-analyst {
    opacity: 0;
    transform: translateY(30px);
    /* Start slightly below */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    /* Added transition for the smooth entry */
}

.team-text-content.visible,
.text-container.visible,
.hero-system-analyst.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
* ALTERNATING STYLES & COLORS (Team Member Sections)
* -------------------------------------------------------------------------- */
#project-manager {
    background-color: #ede7f6;
    --accent-color: #764ba2;
    --text-accent-color: var(--accent-color);
}

/* Remove individual colored-block background color here, now handled by ::before/::after mask */
#project-manager .colored-block {
    /* background-color: #764BA2; */
}

#developer {
    background-color: #ede7f6;
    --accent-color: #4527a0;
    --text-accent-color: var(--accent-color);
}

/* Remove individual colored-block background color here, now handled by ::before/::after mask */
#developer .colored-block {
    /* background-color: #4527A0; */
}

/* #system-analyst styles are defined above in the HERO block */

/* Remove individual colored-block background color here, now handled by ::before/::after mask */
#system-analyst .colored-block {
    /* background-color: #764BA2; */
    /* Using the accent color for the block */
}

#technical-writer {
    background-color: #ede7f6;
    --accent-color: #4527a0;
    --text-accent-color: var(--accent-color);
}

/* Remove individual colored-block background color here, now handled by ::before/::after mask */
#technical-writer .colored-block {
    /* background-color: #4527A0; */
}

/* Layout Reversal (DEV & TW: Image Right, Text Left) */
#developer .content-wrapper,
#technical-writer .content-wrapper {
    flex-direction: row-reverse;
}

#developer .text-container,
#technical-writer .text-container {
    text-align: right;
}

/* FIX: Ensure p/button retain the right alignment on reversed layout */
#developer .text-container h2,
#developer .text-container p,
#developer .text-container .hero-greeting,
#technical-writer .text-container h2,
#technical-writer .text-container p,
#technical-writer .text-container .hero-greeting {
    text-align: right;
}

/* --- MORE INFO BUTTON (used by other sections) --- */
.more-info-button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
    font-size: 1em;
    box-sizing: border-box;
}

.more-info-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
* INFO CARD (MODAL) STYLES
* -------------------------------------------------------------------------- */
.info-card-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.info-card-overlay.active {
    opacity: 1;
    visibility: visible;
}

.info-card {
    background-color: white;
    color: #4527a0;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 650px;
    width: 90%;
    transform: scale(0.8);
    transition: transform 0.3s;
    position: relative;
    box-sizing: border-box;
}

.info-card-overlay.active .info-card {
    transform: scale(1);
}

.info-card h3 {
    color: var(--card-accent-color);
    margin-top: 0;
    border-bottom: 2px solid var(--card-accent-color);
    padding-bottom: 10px;
    word-wrap: break-word;
    padding-right: 30px;
}

.info-card ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #4527a0;
    cursor: pointer;
}

/* --- Social Media Links in Modal --- */
.socmed-links {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.socmed-links a {
    color: var(--card-accent-color);
    font-size: 1.8em;
    transition: transform 0.2s, color 0.3s;
}

.socmed-links a:hover {
    transform: translateY(-2px);
    color: #5e35b1;
}

/* --------------------------------------------------------------------------
* ⚙️ MOBILE MENU STYLES
* -------------------------------------------------------------------------- */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: #5e35b1;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    padding-top: 60px;
    display: block;
    box-sizing: border-box;
}

.mobile-menu-overlay.active {
    transform: translateX(0);
}

.mobile-menu-close {
    position: fixed;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-overlay .portfolio-links,
.mobile-menu-overlay .auth-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-menu-overlay a {
    color: white;
    text-decoration: none;
    margin: 15px 0;
    font-size: 1.5em;
    padding: 5px 0;
    width: 80%;
    text-align: center;
    word-wrap: break-word;
}

.mobile-menu-overlay .auth-links a {
    margin: 10px 0;
    border: 1px solid white;
    border-radius: 5px;
    padding: 10px 20px;
    width: auto;
}

/* --------------------------------------------------------------------------
* ⚙️ MOBILE MEDIA QUERY - 900px and below
* -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    /* FIX 1: Override global scroll restriction to enable scrolling on mobile */
    html,
    body {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
    }

    /* --- Header & Navigation --- */
    header {
        padding: 12px 15px;
        /* FIX: Make header fixed so it doesn't scroll down */
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
    }

    header h1 {
        font-size: 22px;
    }

    .nav-container {
        display: none;
    }

    .menu-toggle {
        display: block;
        font-size: 22px;
        /* FIX 1: Move the burger menu slightly to the left from the edge */
        margin-right: 20px;
    }

    /* --- Main content adjustments --- */
    /* FIX: Add margin-top to main to push content below the fixed header */
    main {
    /* Change 'y mandatory' to 'none' */
    scroll-snap-type: none !important;
    -webkit-scroll-snap-type: none !important;
    -ms-scroll-snap-type: none !important;
    
    /* Ensure normal scrolling behavior */
    overflow-y: auto !important; 
    height: 100vh;
}

    /* --- Section Layout --- */
    .portfolio-section {
        padding: 30px 15px !important;
        /* Re-enable snapping for each section */
        scroll-snap-align: start;
        height: 100vh; /* Must be 100vh for a true "page-by-page" feel */
    }

    .content-wrapper {
        flex-direction: column;
        gap: 30px;
        padding: 30px 0;
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
    }

    /* --- Home Section Adjustments --- */
    #home-system-about {
        padding: 40px 15px !important;
        min-height: auto;
    }

    #home-system-about h2 {
        font-size: 1.8em;
        margin-bottom: 25px;
        padding: 0 10px;
    }

    /* Mobile: Stack summary and carousel vertically */
    .home-content-flex {
        flex-direction: column;
        align-items: center;
        gap: 35px;
        margin-top: 0;
        width: 100%;
        max-width: 100%;
    }

    .summary-box {
        width: 100%;
        max-width: 100%;
        text-align: center;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .summary-box h3 {
        font-size: 1.4em;
        text-align: center;
        margin-bottom: 20px;
        padding: 0;
        line-height: 1.3;
    }

    .summary-box p {
        font-size: 1em;
        line-height: 1.5;
        text-align: center;
        padding: 0 5px;
        margin: 0 auto;
        max-width: 100%;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .carousel-outer-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .carousel-wrapper {
        width: 100%;
        height: 220px;
        max-width: 100%;
    }

    /* Adjusted item size for better mobile fit */
    .carousel-item {
        width: 280px;
        height: 170px;
        margin: 0 10px;
        padding: 15px;
    }

    .carousel-item h3 {
        font-size: 1.3em;
    }

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

    /* Adjust controls for mobile view */
    #prev-slide {
        left: 5px;
        padding: 12px 15px;
        font-size: 1.2em;
    }

    #next-slide {
        right: 5px;
        padding: 12px 15px;
        font-size: 1.2em;
    }

    .action-buttons-group {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 320px;
        margin: 30px auto 0 auto;
        padding: 0 15px;
    }

    .youtube-button,
    .team-pawix-button,
    .booklet-button {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 0.95em;
        text-align: center;
    }

    /* --- YOUTUBE BUTTON HOVER --- */
    .youtube-button:hover {
        background-color: #cc0000;
        /* Deep red for hover */
        transform: translateY(-2px);
    }

    /* --- END YOUTUBE BUTTON HOVER --- */

    /* --- About Section Mobile Fixes --- */
    #about-team-pawix .content-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 35px;
    }

    .team-image-container {
        width: 92%;
        max-width: 380px;
        margin: 0 auto;
        transform: none !important;
        border: 3px solid white;
    }

    .team-landscape-img-tag {
        height: 220px;
    }

    .team-text-content {
        width: 92%;
        max-width: 100%;
        text-align: center;
        margin: 0 auto;
        padding: 0 15px;
    }

    #about-team-pawix h2 {
        font-size: 2.2em;
        text-align: center;
        margin-bottom: 20px;
        line-height: 1.2;
        padding: 0;
    }

    #about-team-pawix p {
        font-size: 1.1em;
        padding: 0;
        margin-bottom: 25px;
        text-align: center;
        line-height: 1.5;
        max-width: 100%;
    }

    .cta-button {
        margin-top: 10px;
        padding: 14px 30px;
        font-size: 1em;
    }

    /* --- Team Member Sections (Font Size Fix) --- */
    .image-container {
        width: 92%;
        max-width: 350px;
        height: 280px;
        margin: 0 auto;
    }

    .colored-block {
        width: 200px;
        height: 200px;
    }

    .profile-img {
        width: 220px;
    }

    .text-container {
        width: 96%;
        max-width: 100%;
        text-align: center !important;
        padding: 25px 20px;
        margin: 0 auto;
        /* FIX: Remove white background card effect for mobile too */
        background-color: transparent !important;
        box-shadow: none !important;
    }

    /* Hero Section Mobile Overrides (Morgia/Universal) */
    #system-analyst .hero-system-analyst {
        width: 100%;
        text-align: center !important;
        padding: 0 !important;
    }

    .hero-greeting,
    .text-container p,
    #system-analyst .hero-system-analyst p,
    #system-analyst .hero-system-analyst .hero-greeting {
        text-align: center !important;
        font-size: 0.85rem !important;
        max-width: 100%;
    }

    /* Setting ALL team member names (h2) to 40px, matching Morgia's size */
    .text-container h2,
    #system-analyst .hero-system-analyst h2 {
        font-size: 32px !important;
        line-height: 1.1;
        margin-bottom: 10px;
        text-align: center !important;
        width: 100%;
    }

    .more-info-button {
        padding: 14px 30px;
        font-size: 1em;
    }

    /* Resetting the reversed layout, everything should stack top-down on mobile */
    #developer .content-wrapper,
    #technical-writer .content-wrapper {
        flex-direction: column;
    }

    /* --- Modal/Info Card Adjustments --- */
    .info-card {
        padding: 25px 20px;
        width: 92%;
        max-width: 350px;
        margin: 20px;
    }

    .info-card h3 {
        font-size: 1.3em;
        padding-right: 30px;
        line-height: 1.3;
    }

    .info-card ul li {
        font-size: 0.95em;
        margin-bottom: 10px;
        line-height: 1.4;
        word-wrap: break-word;
    }

    .socmed-links {
        gap: 15px;
        margin-top: 20px;
    }

    .socmed-links a {
        font-size: 1.6em;
    }

    /* FIX 2: Enhanced hover/focus/active state for mobile menu links (increased opacity) */
    .mobile-menu-overlay a {
        transition: background-color 0.2s;
    }

    .mobile-menu-overlay a:hover,
    .mobile-menu-overlay a:focus,
    .mobile-menu-overlay a:active {
        background-color: rgba(255, 255, 255, 0.3);
        /* Increased opacity for better touch feedback */
        border-radius: 5px;
    }

    .mobile-menu-overlay .auth-links a:hover,
    .mobile-menu-overlay .auth-links a:focus,
    .mobile-menu-overlay .auth-links a:active {
        background-color: rgba(255, 255, 255, 0.5);
        /* Stronger highlight for auth buttons */
    }
}

/* --------------------------------------------------------------------------
* EXTRA SMALL DEVICES - 320px and below
* -------------------------------------------------------------------------- */
@media (max-width: 320px) {
    .summary-box h3 {
        font-size: 1.2em;
    }

    .summary-box p {
        font-size: 0.9em;
    }

    .carousel-item {
        width: 220px;
        height: 140px;
    }

    .action-buttons-group {
        max-width: 260px;
    }

    .text-container h2 {
        font-size: 28px;
    }

    .text-container p {
        font-size: 0.95em;
    }
}
/* Uniform Hero Styling for All Members */
.text-container h2 {
    font-size: 70px !important;
    line-height: 1.1;
    margin-top: 0;
    margin-bottom: 20px;
    letter-spacing: -1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: var(--accent-color) !important;
}

.hero-greeting {
    font-size: 1.2em;
    color: #5e35b1;
    margin-bottom: 5px;
    display: block;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Skill Badges Styling */
.skill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: -5px;
    /* Pulls badges closer to the description */
    margin-bottom: 20px;
    justify-content: flex-start;
}

@media (max-width: 900px) {
    .skill-badges {
        justify-content: center;
        margin-top: 10px;
    }

    .text-container h2 {
        font-size: 40px !important;
    }
}

.badge {
    background-color: var(--accent-color);
    /* Dynamically matches section color */
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Floating Install Button Styles */
.floating-install-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #764ba2;
    /* Matches your theme color */
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    /* Ensure it stays on top of everything */
    cursor: pointer;
    display: none;
    /* Logic in JS will show this */
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    text-decoration: none;
}

.floating-install-btn:hover {
    background-color: #4527a0;
    transform: scale(1.05);
    color: white;
}

.floating-install-btn i {
    font-size: 1.2rem;
}

/* Custom Confirmation Modal Styles */
.install-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.install-modal {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.install-modal h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1.5rem;
}

.install-modal p {
    color: #666;
    margin-bottom: 20px;
}

.install-modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-install-confirm {
    background-color: #764ba2;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-install-confirm:hover {
    background-color: #4527a0;
}

.btn-install-cancel {
    background-color: #f0f0f0;
    color: #333;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-install-cancel:hover {
    background-color: #e0e0e0;
}

/* Responsive adjustments for mobile */
@media (max-width: 600px) {
    .floating-install-btn span {
        display: none;
        /* Icon only on small screens */
    }

    .floating-install-btn {
        padding: 18px;
        border-radius: 50%;
        bottom: 20px;
        right: 20px;
    }
}
  .main-footer {
    background-color: rgb(237, 231, 246); /* */
    color: #4527a0; /* */
    /* Decreased top and bottom padding */
    padding: 30px 20px 20px 20px; 
    width: 100%;
    box-sizing: border-box;
    scroll-snap-align: end; /* */
    display: flex;
    flex-direction: column;
}

.footer-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start; /* */
}

.footer-contact h3, 
.footer-social-wrapper h3 {
    font-size: 1.1rem;
    /* Reduced margin below headers */
    margin-bottom: 10px; 
    color: #4527a0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-contact p {
    font-size: 0.95rem;
    /* Reduced margin between contact items */
    margin: 5px 0; 
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Follow Us Wrapper: Centered with decreased top margin */
.footer-social-wrapper {
    text-align: center;
    margin-top: 15px; 
}

.footer-social {
    display: flex;
    gap: 20px;
    justify-content: center; /* */
}

.footer-social a {
    font-size: 1.8rem;
    color: #4527a0;
    transition: transform 0.3s, color 0.3s;
}

.footer-bottom {
    text-align: center;
    /* Reduced margin above copyright line */
    margin-top: 20px; 
    padding-top: 15px;
    border-top: 1px solid rgba(69, 39, 160, 0.1);
    font-size: 0.85rem;
    opacity: 0.7;
}
    /* --- Desktop Default (Side-by-Side) --- */
.personal-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.personal-info-list li strong {
    min-width: 140px; 
    display: inline-block;
    flex-shrink: 0;
}

.music-content-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
}

/* --- MOBILE ALIGNMENT FIX (900px and below) --- */
@media (max-width: 900px) {
    .personal-info-list li {
        /* Keep side-by-side flex but allow items to wrap if screen is very narrow */
        flex-direction: row; 
        align-items: flex-start;
        text-align: left; /* Move text back to the left */
        gap: 12px;
        flex-wrap: wrap; /* Allows player to move below label on tiny screens */
    }

    .personal-info-list li strong {
        /* Keep labels on the left with a consistent width */
        min-width: 120px; 
        text-align: left;
    }

    .music-content-right {
        /* Aligns Artist name and Player to the start of their container */
        align-items: flex-start; 
        text-align: left;
        margin-top: 0;
    }

    .custom-audio-player {
        /* Shortened playable line for mobile screens */
        width: 100%;
        max-width: 220px; 
        height: 30px;
    }
    
    .socmed-links {
        /* Keep only the social icons centered at the bottom */
        justify-content: center;
        border-top: 1px solid rgba(69, 39, 160, 0.1); /* */
        margin-top: 20px;
        padding-top: 15px;
    }
}