:root {
    /* Refined Color Palette - Scientific Purple / AI Theme */
    /* Using Neutral Grays to remove any 'blue' undertones from the background */
    --bg-primary: #0a0a0a;
    /* Neutral 950 - Pure dark, no blue tint */
    --bg-secondary: #171717;
    /* Neutral 900 */
    --text-primary: #fafafa;
    /* Neutral 50 */
    --text-secondary: #a3a3a3;
    /* Neutral 400 */

    /* Accent - Violet/Purple (Creative, Wisdom, Innovation - Great for AI) */
    --accent: #8b5cf6;
    /* Violet 500 */
    --accent-hover: #7c3aed;
    /* Violet 600 */
    --accent-text: #f5f3ff;
    /* Violet 50 */

    --border: #262626;
    /* Neutral 800 */

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    /* Typography */
    --font-main: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    /* Transitions */
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

.home-body {
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

@media (min-width: 769px) {
    .home-body {
        overflow: hidden;
        /* Prevent scroll on home page only for desktop */
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Links */
a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--accent);
}

/* Layout Containers */
.container {
    max-width: 1400px;
    /* Wider container */
    margin: 0 auto;
    padding: 0 2rem;
    /* Significant horizontal padding */
    width: 100%;
}

/* Navbar */
.navbar {
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    /* Remove horizontal padding from wrapper, let container handle it */
    border-bottom: 1px solid var(--border);
    width: 100%;
}

.nav-container {
    display: flex;
    justify-content: center;
    /* Centers the main content (nav-links) */
    align-items: center;
    max-width: 100%;
    /* Use full width */
    margin: 0;
    padding: 0 2rem;
    /* Add padding for the "slight margin" requested */
    width: 100%;
    position: relative;
    /* Reference for absolute positioning */
    box-sizing: border-box;
    /* Ensure padding doesn't affect width calculation */
}

.logo {
    display: flex;
    /* Ensure image aligns nicely */
    align-items: center;
    text-decoration: none;
    position: absolute;
    /* Absolute left */
    left: 2rem;
    /* Align with container padding */
}

/* Logo - No hover effect as requested */
/* Duplicated .logo rule removed */

.nav-logo-img {
    height: 40px;
    /* Adjust height to fit navbar */
    width: auto;
    object-fit: contain;
    display: block;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-link {
    color: var(--text-primary);
    /* Default white */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    font-size: 1rem;
    padding-bottom: 5px;
    /* Space for line */
    overflow: hidden;
    /* Hide line when outside */
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
    color: var(--accent);
    /* Purple text on hover */
    text-shadow: none;
    /* Remove glow */
}

/* Underline Animation (Bottom Up + Fade In) */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent);
    transform: translateY(100%);
    /* Start below */
    opacity: 0;
    /* Hidden (Fade In start) */
    transition: all 0.3s ease;
    display: block;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateY(0);
    /* Slide up */
    opacity: 1;
    /* Fade in */
}

.nav-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
    align-self: center;
    opacity: 0.7;
    white-space: nowrap;
    position: absolute;
    /* Absolute right */
    right: 2rem;
    /* Align with container padding */
}

/* Mobile Menu Overrides */
@media (max-width: 768px) {
    .nav-container {
        justify-content: space-between;
        /* Reset for mobile */
        padding: 0 1.5rem;
    }

    .logo,
    .nav-text {
        position: static;
        /* Reset absolute positioning */
    }

    .nav-text {
        position: static;
        /* Ensure it flows */
        margin-left: 0;
        margin-top: 2rem;
        width: 100%;
        text-align: center;
    }

    .nav-links {
        display: none;
        /* ... rest of mobile styles ... */
    }
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    /* Pill shape for modern look */
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    /* Ensure text visible on purple */
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    color: white;
    /* Ensure text visible on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    /* Purple glow */
}

.btn-outline {
    background-color: transparent;
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background-color: rgba(139, 92, 246, 0.1);
    /* Purple tint */
}

/* Home Page Specifics - Full Screen */
.home-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    padding-top: 120px;
    /* Align with other pages (My Projects) */
}

.hero {
    display: flex;
    align-items: flex-start;
    /* Align to top to match 120px padding */
    justify-content: space-between;
    gap: 4rem;
    height: 100%;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-text h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.2rem;
    /* Reduce gap between H1 and H2 */
}

.hero-titles h3 {
    margin-bottom: -0.2rem;
}

.hero-text h2 {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    /* Reduced margin for tighter grouping */
}

/* Wrapper to align logo side-by-side with titles */
.hero-header-wrapper {
    display: flex;
    align-items: flex-start;
    /* Center vertically relative to text block */
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.hero-titles {
    display: flex;
    flex-direction: column;
}

.hero-logo {
    height: auto;
    width: auto;
    max-height: 220px;
    /* Approximate height of the 3 text lines */
    margin-bottom: 0;
    display: block;
    margin-top: 5px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 400px;
    width: 100%;
    border-radius: 20px;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.5), -20px -20px 60px rgba(255, 255, 255, 0.05);
    /* Neumorphism hint */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cards (Projects, Events, etc) */
.page-content {
    padding-top: 120px;
    padding-bottom: 4rem;
    /* Removed horizontal padding 0 to inherit from .container */
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    /* Ensure relative positioning for github icon */
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.card-image {
    width: 100%;
    height: auto;
    /* Allow natural height */
    max-height: 400px;
    /* Prevent extremely tall images */
    object-fit: contain;
    /* Ensure full image is visible, no cropping */
    background-color: #000;
    opacity: 1;
    /* User requested full opacity for articles */
    transition: opacity 0.3s;
}

.card:hover .card-image {
    opacity: 1;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    /* Ensure content fills available space in grid row */
    display: flex;
    flex-direction: column;
}

.card-tags {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background-color: rgba(139, 92, 246, 0.15);
    /* Purple tint */
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-card {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border);
    transition: 0.3s;
}

.contact-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 3rem;
    color: white;
    /* Changed to white as requested */
    margin-bottom: 1rem;
}

/* Project GitHub Link (Corner) */
.card-github-link {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--text-secondary);
    /* Neutral default color */
    z-index: 10;
    transition: all 0.3s;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bg-primary);
    /* Solid background */
    border: 1px solid var(--border);
    /* Neutral border */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.card-github-link:hover {
    background-color: var(--bg-primary);
    color: var(--accent);
    /* Purple on hover */
    border-color: var(--accent);
    /* Purple border on hover */
    transform: scale(1.1);
}

/* Modal Response */
@media (max-width: 768px) {
    .navbar {
        position: fixed;
        background-color: var(--bg-primary);
        border-bottom: 1px solid var(--border);
        padding: 1rem 0;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--bg-primary);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--border);
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    /* Fixed padding to avoid shorthand overrides */
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        padding-top: 0;
        padding-bottom: 0;
    }

    .home-container {
        height: auto;
        padding-top: 140px;
        /* Increased padding to clear fixed navbar */
        padding-bottom: 3rem;
        padding-left: 2rem;
        /* Larger margins for home page as requested */
        padding-right: 2rem;
    }

    .page-content {
        padding-top: 140px;
        /* Match home-container for consistency */
    }

    /* Ensure sections stack and headers are visible */
    .hero {
        flex-direction: column !important;
        text-align: center;
        gap: 2rem;
        width: 100%;
    }

    .hero-text {
        order: 1;
        width: 100%;
        max-width: 100%;
        flex: none;
    }

    .hero-image {
        order: 2;
        width: 100%;
        max-width: 100%;
        flex: none;
    }

    .hero-header-wrapper {
        display: block;
        margin-bottom: 1rem;
    }

    .hero-text h1 {
        font-size: 2.2rem;
        /* Slightly smaller to fit better */
        background: none;
        -webkit-text-fill-color: var(--text-primary);
        color: var(--text-primary);
        margin-bottom: 0.5rem;
        display: block;
    }

    .hero-text h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        display: block;
    }

    .hero-text h2 {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
        display: block;
    }

    /* Skills cards full width */
    .hero-image .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
        width: 100%;
    }

    .hero-image .card {
        width: 100% !important;
        max-width: none !important;
    }
}

/* ... (Timeline styles unchanged) ... */

/* Modal Styles Update */
#modalImage {
    width: 100%;
    height: auto;
    /* Natural height */
    max-height: 80vh;
    /* Prevent it from being taller than screen */
    object-fit: contain;
    /* Maintain ratio */
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: none;
    background-color: transparent;
}

/* Timeline Styles (Experience) */
.experience-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.experience-grid h2 {
    color: var(--text-primary);
}

@media (max-width: 900px) {
    .experience-grid {
        display: flex;
        flex-direction: column;
        gap: 3rem;
    }

    .education-column {
        order: 1;
        /* Education first on mobile */
        margin-bottom: 1rem;
    }

    .experience-column {
        order: 2;
        /* Experience second on mobile */
    }
}

/* Independent scroll for Experience */
@media (min-width: 901px) {
    .experience-page {
        overflow: hidden;
    }

    .experience-page .page-content {
        height: calc(100vh - 80px);
        /* Height minus navbar */
        display: flex;
        flex-direction: column;
    }

    .experience-grid {
        flex: 1;
        min-height: 0;
        /* Important for flex child to be scrollable */
    }

    .experience-column {
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .experience-column h2 {
        padding-left: 100px;
    }

    .scroll-hint {
        display: block;
        padding-left: 100px;
        font-size: 0.85rem;
        color: var(--text-secondary);
        margin-bottom: 0.5rem;
        font-style: italic;
        opacity: 0.7;
    }

    .timeline {
        flex: 1;
        overflow-y: auto;
        padding-right: 2rem;
        padding-bottom: 3rem;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE and Edge */
        position: relative;
    }

    .timeline::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari, Opera */
    }
}


.education-card {
    background-color: transparent;
    border: none;
    padding: 0;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0;
}

.timeline::after {
    display: none;
    /* Using .timeline-item::before for per-item segments instead */
}

.timeline-item {
    padding: 5px 0 5px 100px;
    position: relative;
    background-color: inherit;
    width: 100%;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    width: 1px;
    background-color: var(--text-secondary);
    top: 74px;
    /* Center of dot */
    bottom: -74px;
    /* Bridge to center of next dot */
    left: 50px;
    opacity: 0.8;
    z-index: 1;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 11px;
    /* Slightly larger dot */
    height: 11px;
    right: auto;
    background-color: var(--text-secondary);
    top: 68px;
    /* Adjusted for size */
    border-radius: 50%;
    z-index: 10;
    left: 50px;
    transform: translateX(-50%);
    box-shadow: 0 0 0 4px var(--bg-primary);
    transition: all 0.3s ease;
}

/* Hover Effect for Dot - ONLY when content is hovered */
.timeline-item:has(.timeline-content:hover)::after {
    border: 2px solid var(--accent);
    background-color: var(--accent);
    box-shadow: 0 0 0 4px var(--bg-primary), 0 0 0 6px rgba(139, 92, 246, 0.3);
    transform-origin: center;
    /* Move up 5px and scale, maintaining center X alignment */
    transform: translateX(-50%) translateY(-5px) scale(1.2);
}

.timeline-content {
    padding: 20px;
    background-color: var(--bg-secondary);
    position: relative;
    border-radius: 6px;
    border: 1px solid var(--border);
    cursor: pointer;
    /* Clickable */
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.date {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}

/* Modal Styles */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Prevent body/overlay scroll */
    background-color: rgba(0, 0, 0, 0.85);
    /* Darker bg */
    backdrop-filter: blur(5px);
    /* Flex to center modal */
    align-items: center;
    justify-content: center;
    padding: 0;
    /* Reset padding */
}


.modal-content {
    background-color: var(--bg-secondary);
    margin: 0;
    padding: 0;
    /* Remove padding from container, move to children */
    border: 1px solid var(--border);
    width: 100%;
    max-width: 900px;
    height: auto;
    max-height: 90vh;
    /* Max height relative to viewport */
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    position: relative;
    display: flex;
    flex-direction: column;
    /* Column layout */
    animation: modalSlideIn 0.3s ease-out;
    overflow: hidden;
    /* Hide overflow on container */
}

/* Scrollable Inner Body */
.modal-body-scroll {
    min-height: 0;
    flex: 1;
    /* Take all available space minus header/footer */
    overflow-y: auto;
    /* Scroll ONLY this part */
    padding: 1.5rem 2rem 2rem 2rem;
    /* Increased top padding matching image margin */
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.5rem 2rem 0.5rem 2rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    /* border-bottom: 1px solid var(--border); REMOVED */
    background-color: var(--bg-secondary);
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 2rem;
    right: 2rem;
    height: 1px;
    background-color: var(--border);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

#modalTitle {
    color: var(--text-primary);
    margin-bottom: 0.1rem;
    /* Much tighter spacing */
    margin-top: 0;
    padding-right: 2rem;
}

.modal-date {
    color: var(--accent);
    font-weight: bold;
    margin-bottom: 0.1rem;
    /* Tighter spacing */
    display: block;
    font-size: 0.9rem;
}

#modalSubtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1rem;
    /* Start of body spacing */
    margin-top: 0;
    display: block;
}

#modalSubtitle:empty {
    display: none;
    margin: 0;
}

#modalLink {
    display: table;
    margin-top: 1.5rem;
}

#modalDesc {
    overflow-y: visible;
    /* Content flows naturally */
    height: auto;
    padding-right: 0;
    margin-top: 0.5rem;
}

/* Custom Scrollbar for modal overlay (using body scroll style usually) or custom class */
.modal::-webkit-scrollbar {
    width: 10px;
}

.modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.modal::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 5px;
}



@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}



/* Modal Footer */
/* Modal Footer */
/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    padding: 0.5rem 1.5rem;
    /* border-top: 1px solid var(--border); REMOVED */
    flex-shrink: 0;
    background-color: var(--bg-secondary);
    position: relative;
}

.modal-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background-color: var(--border);
}

.modal-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.modal-github {
    right: auto;
    width: 40px;
    /* Smaller button */
    height: 40px;
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    /* Slightly smaller icon */
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    padding: 0;
    backdrop-filter: none;
}

.modal-github:hover {
    background-color: var(--bg-primary);
    color: var(--accent);
    border-color: var(--accent);
    transform: scale(1.1);
}

.modal-footer #modalLink {
    display: inline-flex;
    margin-top: 0;
}

.modal-date {
    color: var(--accent);
    font-weight: bold;
    margin-bottom: 0.5rem;
    display: block;
}

/* --- Gallery Styles --- */
.gallery-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    /* Tighter spacing */
    background-color: transparent;
    padding: 0;
    flex-shrink: 0;
    /* Don't shrink image container */
}

.gallery-track {
    /* display: flex; Removed for dynamic height support */
    width: 100%;
}

.gallery-image {
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    /* Center it */
    height: auto;
    max-height: 55vh;
    object-fit: contain;
    /* display: block;  Managed by JS now */
    opacity: 1;
}

.gallery-nav {
    position: absolute;
    /* Absolute inside specific relative container */
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    /* Lower z-index since it's inside modal */
    font-size: 2.5rem;
    transition: all 0.3s;
    /* Drop shadow to ensure visibility on bright images */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.gallery-nav:hover {
    color: var(--accent);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 10px;
    /* Inside left */
    opacity: 0;
    pointer-events: none;
}

.gallery-nav.next {
    right: 10px;
    /* Inside right */
}

/* Remove media query for positioning */

.gallery-nav.prev.visible {
    opacity: 1;
    pointer-events: auto;
}

.gallery-nav.next {
    right: 10px;
}

/* To create the "sticking out" effect (linked list style), we can make the images slightly smaller than 100% or add right margin, and let the next one peek? 
   Actually user said "images slightly stick out on the right". 
   If we have 100% width, we see one. 
   If we want to see the next one, we can set width to e.g. 90% and have overflow visible on container? 
   But user said "like linked list".
   Let's try width: 95% and margin-right: 10px. 
*/
.gallery-image {
    width: 100%;
    /* Show full width */
    max-width: calc(100% - 40px);
    /* Leave space for next image to peek */
    margin-right: 20px;
    /* Space between */
    flex-shrink: 0;
    object-fit: contain;
    max-height: 80vh;
    display: block;
    opacity: 1;
    transition: opacity 0.3s;
}

/* Remove previous gallery-image block at end of file to avoid conflicts */