html {
    scroll-behavior: smooth;
}
/* Fix overlap for employment history section */
.employment-history-section.func-section {
    margin-top: 40px;
}

/* Fix inconsistent padding for about section */
.about.func-section {
    padding: 24px 32px 24px 32px !important;
}

@media (max-width: 768px) {
    .resume .base .profile .photo img {
        width: 90vw;
        max-width: 180px;
        height: auto;
        min-width: 80px;
        display: block;
        margin: 0 auto;
    }
}

/* Add padding to all func-section sections except summary for better spacing */
.func-section:not(#summary) {
    padding: 24px 32px 24px 32px;
    box-sizing: border-box;
}

/* Highlight section when menu item is hovered */
.func-section.menu-hover-highlight {
    background: transparent !important;
    color: inherit !important;
    box-shadow:
        0 0 16px 4px #232323cc,
        0 0 32px 8px #88887a66;
    border-radius: 36px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

/* Video link active state */
.video-link.active {
    font-weight: bold;
    color: #c68c05 !important;
    text-decoration: underline;
}

/* Video Preview (on hover) */
.video-preview {
    position: fixed;
    display: none;
    width: 240px;  /* Smaller width */
    height: 180px; /* Smaller height */
    background: #1e1e1e;
    border: 2px solid #c68c05;
    border-radius: 8px;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    opacity: 0;  /* Start transparent for fade-in animation */
    transform: scale(0.95);  /* Start slightly smaller for zoom-in animation */
    transition: opacity 0.2s ease, transform 0.2s ease;  /* Smooth transition */
}

.video-preview .preview-content {
    width: 100%;
    height: 100%;
}

.video-preview .preview-video,
.video-preview .preview-image,
.video-preview .preview-text,
.video-preview .preview-grid {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.video-preview .preview-text {
    flex-direction: column;
    text-align: center;
    padding: 10px;
    background: #1e1e1e;
    color: #fff;
}

.video-preview .preview-text h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #c68c05;
}

.video-preview .preview-text p {
    margin: 0;
    font-size: 12px;
}

.video-preview iframe {
    width: 100%;
    height: 100%;
}

.video-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Miniature Grid Preview Styles */
.video-preview .preview-grid {
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #1e1e1e;
    padding: 3px;
    overflow: hidden;
}

.video-preview .preview-grid-title {
    color: #c68c05;
    font-size: 12px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 2px;
    padding: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 16px;
}

.video-preview .preview-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1px;
    flex: 1;
    width: 100%;
}

.video-preview .preview-grid-item {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.video-preview .preview-grid-item img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0;
    left: 0;
    transition: transform 0.3s ease;
}

.video-preview .preview-grid-item:hover img {
    transform: scale(1.1);
}

/* --- Menubar Styling --- */
/* Ensure anchor jumps don't hide content behind fixed menubar */
.func-section,
.info,
.about,
.contact {
    scroll-margin-top: 70px;
}

/* Wiggle animation for contact icons */
/* Only wiggle icons in the #contact section */
#contact a:hover i.fas,
#contact a:hover i.fab {
    animation: wiggle 0.8s ease;
}
#contact i.fas,
#contact i.fab {
    transition: transform 0.2s cubic-bezier(0.4,0,0.2,1);
    display: inline-block;
}
@keyframes wiggle {
    0% { transform: rotate(0deg); }
    15% { transform: rotate(-15deg); }
    30% { transform: rotate(10deg); }
    45% { transform: rotate(-10deg); }
    60% { transform: rotate(6deg); }
    75% { transform: rotate(-4deg); }
    100% { transform: rotate(0deg); }
}

/* --- Menubar Styles --- */
.menubar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(48, 48, 48, 0.7);
    /* semi-transparent dark */
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 0;
    height: 48px;
    backdrop-filter: blur(6px);
}

.menubar ul {
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.menubar li {
    display: flex;
    align-items: center;
}

/* Add separator between menu items except last */
.menubar li:not(:last-child) {
    position: relative;
}

.menubar li:not(:last-child)::after {
    content: '';
    display: block;
    width: 1.5px;
    height: 22px;
    background: #c68c05;
    margin: 0 2px;
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 2px;
    opacity: 0.7;
}

.menubar a {
    color: #919191;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1em;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}


}

.menubar a:hover,
.menubar a.active {
    background: none;
    color: #e0e0e0;
}

body {
    padding-top: 48px;
    /* offset for menubar */
}

@media (max-width: 768px) {
    .menubar {
        height: 50px;
        padding: 0 8px;
    }

    .menubar ul {
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(198, 140, 5, 0.3) rgba(48, 48, 48, 0.7);
        padding: 0 4px;
        justify-content: flex-start;
    }

    .menubar ul::-webkit-scrollbar {
        height: 3px;
    }

    .menubar ul::-webkit-scrollbar-thumb {
        background: rgba(198, 140, 5, 0.5);
        border-radius: 2px;
    }

    .menubar li {
        flex-shrink: 0;
    }

    .menubar li:not(:last-child)::after {
        display: none; /* Hide separators on mobile for better spacing */
    }

    .menubar a {
        font-size: 0.85em;
        padding: 8px 10px;
        white-space: nowrap;
        min-width: fit-content;
    }

    body {
        padding-top: 50px;
    }
}

@media (max-width: 480px) {
    .menubar {
        height: 48px;
        padding: 0 4px;
    }

    .menubar ul {
        gap: 4px;
        padding: 0 2px;
    }

    .menubar a {
        font-size: 0.8em;
        padding: 6px 8px;
    }

    body {
        padding-top: 48px;
    }
}

@import url("https://fonts.googleapis.com/css?family=Roboto");

/* Password protection styles */
.resume.locked {
    filter: none;
    pointer-events: none;
}

.welcome-text {
    color: #333;
    margin-bottom: 20px;
    padding: 0 15px;
    font-family: Roboto, sans-serif;
}

@media (max-width: 768px) {
    .welcome-text h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .welcome-text p {
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 15px;
    }

    .password-container button {
        padding: 12px 24px;
        font-size: 16px;
        width: 80%;
        max-width: 300px;
        margin-top: 10px;
    }

    .password-overlay {
        padding: 15px;
    }
}

.welcome-text h1 {
    margin-bottom: 10px;
    color: #c68c05;
}

.welcome-text p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.password-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    margin: 20px;
    box-sizing: border-box;
}

.password-container input {
    padding: 12px;
    margin: 15px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 80%;
    max-width: 300px;
    font-size: 16px;
}

.password-container button {
    padding: 8px 16px;
    background: #c68c05;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.password-container button:hover {
    background: #a57704;
}

/* Removed profile image animation */
.resume .base .profile .photo img {
    width: 100%;
    border-radius: 50%;
    position: relative;
}

/* Keywords styling */
.keyword {
    transition: color 0.3s ease;
    position: relative;
    display: inline;
    cursor: default;
}

.about p:hover .keyword,
.info p:hover .keyword {
    color: #c68c05;
    /* Project's warm amber accent color */
}

.keyword:hover {
    color: #dbc4ae !important;
    /* Project's beige accent color for direct hover */
}

/* Function section styling */
.func-section ul li {
    position: relative;
    padding-left: 18px;
    transition: all 0.3s ease;
}

.func-section ul li:hover {
    transform: translateX(3px);
}

.func-section.work ul li::before,
.func-section.edu ul li::before {
    content: '';
    position: absolute;
    left: 0;
    display: none !important;
}

/* Styles for Notable Experience & Qualifications */
.func-section.work ul li,
.func-section.edu ul li {
    position: relative;
    cursor: pointer;
    display: block;
    width: fit-content;
}

.func-section.work ul li>a>span:first-child,
.func-section.edu ul li>a>span:first-child,
.func-section.work ul li>span:first-child,
.func-section.edu ul li>span:first-child {
    position: relative;
    display: inline-block;
    color: #c0c0c0;
    transition: color 0.3s ease;
}

.func-section.work ul li>a:hover>span:first-child,
.func-section.edu ul li>a:hover>span:first-child,
.func-section.work ul li:hover>span:first-child,
.func-section.edu ul li:hover>span:first-child {
    color: #c68c05;
}

/* Single underline animation - only for main titles */
.func-section.work ul li>a>span:first-child::after,
.func-section.edu ul li>a>span:first-child::after,
.func-section.work ul li>span:first-child::after,
.func-section.edu ul li>span:first-child::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #c68c05;
    transition: width 0.3s ease;
}

.func-section.work ul li>a:hover>span:first-child::after,
.func-section.edu ul li>a:hover>span:first-child::after,
.func-section.work ul li:hover>span:first-child::after,
.func-section.edu ul li:hover>span:first-child::after {
    width: 100%;
}

/* Remove any underline from small text */
.func-section.work ul li small::after,
.func-section.edu ul li small::after {
    display: none;
}

/* Base styles */
* {
    outline: none;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

/* Interactive elements base styles */
a,
button,
.video-link,
.func-section ul li {
    cursor: pointer;
    transition: all 0.3s ease;
}

a:hover,
button:hover,
.video-link:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

html,
body {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: 0.5s;
    background: #303030;
    cursor: default;
    font-family: "Roboto", sans-serif;
    font-size: 11px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

@media (max-width: 768px) {

    html,
    body {
        font-size: 10px;
    }

    .animated-name {
        font-size: 1.2em;
        margin: 10px 0 6px 0;
    }

    h3 {
        font-size: 0.9em;
    }

    .resume .base .profile .info .name {
        font-size: 1.1em;
    }

    .resume .base .profile .info p,
    .resume .base .about p {
        font-size: 0.75em;
    }

    .resume .base {
        padding: 8px 4px;
    }

    .resume .base .profile {
        padding: 10px 4px 8px 4px;
        margin: -8px -4px 8px -4px;
    }

    .resume .base .profile .photo {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin-bottom: 10px;
    }

    .resume .base .profile .photo img {
        width: 100px;
        height: 100px;
        min-width: 80px;
        min-height: 80px;
        max-width: 120px;
        max-height: 120px;
        aspect-ratio: 1/1;
        object-fit: cover;
        border-radius: 50%;
        display: block;
        margin: 0 auto;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    }

    .resume .base .contact div {
        line-height: 14px;
        margin-bottom: 4px;
    }

    .resume .base .contact div i {
        width: 12px;
        height: 12px;
        font-size: 12px;
        margin-right: 6px;
    }

    .resume .func {
        padding: 8px 4px;
        gap: 8px;
    }

    .func-section {
        padding: 8px;
    }

    .func-section ul li {
        padding-left: 12px;
        padding-bottom: 6px;
        font-size: 0.75em;
    }

    .func-section ul li::before {
        width: 4px;
        height: 4px;
        border-width: 1.5px;
    }

    .skills-soft.func-section ul li {
        width: 48%;
        margin-bottom: 8px;
    }

    .skills-soft.func-section ul li svg {
        width: 60%;
    }

    .skills-soft.func-section ul li span,
    .skills-soft.func-section ul li small {
        font-size: 0.7em;
    }

    .skills-prog.func-section ul li {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 6px;
    }

    .skills-prog.func-section ul li .skills-bar {
        width: 100%;
        margin-left: 0;
        margin-top: 3px;
        height: 2px;
    }

    .skills-prog.func-section ul li span {
        width: 100%;
        margin-bottom: 2px;
        font-size: 0.7em;
    }

    .interests.func-section .interests-items {
        gap: 8px;
    }

    .interests.func-section .interests-items div {
        min-width: 40px;
        height: 50px;
    }

    .interests.func-section .interests-items div i {
        font-size: 18px;
        width: 24px;
        height: 24px;
        line-height: 24px;
    }

    .interests.func-section .interests-items div span {
        font-size: 0.7em;
    }
}



a {
    text-decoration: none;
    color: #909090;
    display: block;
    transition-duration: 0.3s;
}

ul {
    list-style-type: none;
    padding: 0;
}

/* Animated name styling */
.animated-name {
    font-size: 2.5em;
    margin: 25px 0 15px 0;
    padding: 5px 0;
    color: #dbc4ae;
    cursor: pointer;
}

.animated-name .name-wrapper {
    transition: all 0.8s ease;
    position: relative;
    display: inline-block;
    transform: rotate(0deg);
    filter: blur(0);
}

.animated-name:hover .name-wrapper {
    color: #c68c05;
}

.profile:hover .photo img {
    transform: none;
    filter: none;
}

.animated-name .name-wrapper::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: #c68c05;
    transition: width 0.5s ease;
}

.animated-name:hover .name-wrapper::after {
    width: 100%;
}

h3 {
    color: #dbc4ae;
    margin: 10px 0;
    text-transform: lowercase;
    font-size: 1.25em;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
    transform-origin: left;
}

/* Header hover effects */
h3:hover {
    color: #c68c05;
    transform: scale(1.03);
}

/* Header icon spin animation */
h3 i {
    transition: transform 0.5s ease;
    display: inline-block;
    margin-right: 5px;
}

h3:hover i {
    transform: rotate(360deg);
}

/* Removed underline animation for headings */
h3::after {
    content: none;
}

/* Splash Screen styles */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.splash-content {
    background: #303030;
    width: 90%;
    max-width: 600px;
    height: auto;
    max-height: 80vh;
    border-radius: 16px;
    position: relative;
    border: 1px solid #dbc4ae;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0 auto;

    @media (max-width: 600px) {
        .splash-content {
            width: 98vw;
            max-width: 98vw;
            min-width: 0;
            max-height: 90vh;
            border-radius: 10px;
            padding: 0 2vw;
        }
    }
}

.splash-header {
    padding: 15px 20px;
    border-bottom: 1px solid #dbc4ae;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.splash-title {
    color: #dbc4ae;
    margin: 0;
    font-size: 24px;
}

.close-splash {
    background: none;
    border: none;
    color: #dbc4ae;
    font-size: 28px;
    cursor: pointer;
    padding: 0 8px;
    transition: color 0.3s ease;
}

.close-splash:hover {
    color: #fff;
}

.splash-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.splash-description {
    color: #a6a5a0;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.splash-preview {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 15px 0;
}

.image-grid {
    display: grid;
    /* auto-fit with a small min column keeps multiple columns on narrow screens */
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    padding: 12px;
    box-sizing: border-box;
    flex-grow: 1;
    overflow-y: auto;
    align-content: start;
    height: calc(100% - 60px);
    /* Account for controls height */
}

.grid-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #242424;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    padding: 0;
    height: auto;
    min-height: 0;
    min-width: 0;
}

.grid-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.grid-item img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* show full image without cropping */
    transition: transform 0.3s ease;
    background: #242424;
}

/* Responsive: make grid more suitable on smaller screens */
@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
        padding: 8px;
    }

    .grid-item {
        border-radius: 4px;
        box-shadow: none; /* remove drop shadow on mobile */
        background: transparent; /* remove dark background on mobile */
        padding: 8px;
        position: relative;
    }

    .grid-item img {
        position: static;
        display: block;
        max-width: 100%;
        height: auto;
        object-fit: contain;
        background: transparent;
    }
    /* Remove hover effects on mobile so there is no shadow/scale */
    .grid-item:hover {
        transform: none;
        box-shadow: none;
    }
}

@media (max-width: 480px) {
    .image-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 6px;
        padding: 6px;
    }
}

/* Desktop: force a 3-column layout for wider screens */
@media (min-width: 992px) {
    .image-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
        padding: 16px;
    }
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 15px;
    flex-shrink: 0;
    background: #303030;
    border-top: 1px solid rgba(219, 196, 174, 0.2);
}

.carousel-prev,
.carousel-next {
    background: none;
    border: 2px solid #dbc4ae;
    color: #dbc4ae;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: #dbc4ae;
    color: #303030;
}

.carousel-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(219, 196, 174, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #dbc4ae;
    transform: scale(1.2);
}

/* Custom scrollbar for the grid */
.image-grid::-webkit-scrollbar {
    width: 8px;
}

.image-grid::-webkit-scrollbar-track {
    background: #242424;
    border-radius: 4px;
}

.image-grid::-webkit-scrollbar-thumb {
    background: #dbc4ae;
    border-radius: 4px;
}

.image-grid::-webkit-scrollbar-thumb:hover {
    background: #dbc4ae;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    background: #dbc4ae;
    color: #303030;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

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

.popup-title {
    color: #dbc4ae;
    margin: 0 0 10px 0;
    font-size: 1.4em;
    text-transform: uppercase;
}

.popup-description {
    color: #a6a5a0;
    margin: 0;
    font-size: 1.1em;
    line-height: 1.4;
}




/* Add top margin to .resume to account for fixed menubar */
.resume {
    width: 100%;
    max-width: 960px;
    background: #303030;
    color: #a6a5a0;
    margin: 20px auto;
    box-shadow: 0px 0px #303030;
    /* Effectively none */
    position: relative;
    display: flex;
    flex-direction: row;
    padding: 0 15px;
    box-sizing: border-box;
    margin-top: 64px;
    /* Adjust this value to match menubar height */
}

@media (max-width: 768px) {
    .resume {
        flex-direction: column;
        padding: 0 10px;
        margin-top: 56px;
        /* Slightly smaller margin for mobile if menubar is shorter */
    }
}

.resume .base,
.resume .func {
    box-sizing: border-box;
}

.resume .base>div,
.resume .func>.func-row>.func-section,
.resume .func>.func-section {
    padding-bottom: 10px;
}


.resume .base>div:last-of-type,
.resume .func>.func-row:last-of-type>.func-section:last-child,
/* Ensure last section in last row has no bottom padding */
.resume .func>.func-section:last-of-type {
    padding-bottom: 0;
}


.resume .base {
    width: 30%;
    padding: 30px 15px;
    background: #303030;
    color: #909090;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .resume .base {
        width: 100%;
        padding: 15px 10px;
    }

    .resume .base .profile {
        padding: 20px 10px 15px 10px;
        margin: -15px -10px 15px -10px;
    }

    .resume .base .profile .photo img {
        width: 120px;
        height: 120px;
    }

    .resume .base .contact div {
        line-height: 20px;
        margin-bottom: 8px;
    }

    .resume .base .contact div i {
        width: 16px;
        height: 16px;
        font-size: 16px;
        margin-right: 10px;
    }
}

.resume .base .plaintext-resume {
    margin: 10px 0;
}

.resume .base .plaintext-resume .resume-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: #c68c05;
    border: none;
    color: #303030;
    border-radius: 4px;
    text-transform: lowercase;
    font-size: 0.85em;
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.resume .base .plaintext-resume .resume-btn:hover {
    background: #dbc4ae;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.resume .base .plaintext-resume .resume-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.resume .base .plaintext-resume .resume-btn i {
    margin-right: 8px;
}

.resume .base .plaintext-resume a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: #303030;
    border: 1px solid #c68c05;
    color: #c68c05;
    border-radius: 4px;
    text-transform: lowercase;
    font-size: 0.85em;
    transition: all 0.3s ease;
}

.resume .base .plaintext-resume a:hover {
    background: #c68c05;
    color: #303030;
    transform: translateY(-1px);
}

.resume .base .plaintext-resume a i {
    margin-right: 8px;
}

.resume .base .profile {
    background: #303030;
    padding: 30px 15px 20px 15px;
    margin: -30px -15px 20px -15px;
    position: relative;
    z-index: 2;
}

.resume .base .profile::after {
    display: none;
}

.resume .base .profile .photo {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.resume .base .profile .photo img {
    width: 100%;
    border-radius: 50%;
    position: relative;
}

@keyframes pulseCircle {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.3;
    }

    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

.resume .base .profile .fa-rocket {
    font-size: 100px;
    text-align: center;
    margin: auto;
    color: #727272;
}

.resume .base .profile .info {
    text-align: left;
    color: #909090;
    margin-bottom: 30px;
}

.resume .base .profile .info p,
.resume .base .about p {
    font-size: 0.95em;
    line-height: 1.5;
    color: #a0a0a0;
    margin-bottom: 0;
}

.resume .base .about {
    background: #303030;
    padding: 20px 15px;
    margin: 0 -15px 20px -15px;
    position: relative;
}

.resume .base h3 {
    color: #dbc4ae;
    font-size: 1.25em;
    margin: 0 0 20px 0;
    text-transform: lowercase;
}


.resume .base .profile .info .name {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 1.75em;
    text-transform: lowercase;
    color: #a0a0a0;
}

.resume .base .contact {
    margin-bottom: 30px;
    padding: 0;
}

.resume .base .contact:first-of-type {
    margin-top: 25px;
}

.resume .base .contact div {
    line-height: 24px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.resume .base .contact div:last-child {
    margin-bottom: 0;
}

.resume .base .contact div:last-child {
    margin-bottom: 0;
}

.resume .base .contact div a {
    display: flex;
    align-items: center;
    width: 100%;
    color: #909090;
}

.resume .base .contact div a:hover {
    color: #dfdfdf;
    transform: translateX(2px);
}

.resume .base .contact div a:hover span::after {
    width: 100%;
}

.resume .base .contact div:hover i {
    color: #c8a712;
}

.resume .base .contact div i {
    color: #c68c05;
    width: 20px;
    height: 20px;
    font-size: 20px;
    text-align: center;
    margin-right: 15px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.resume .base .contact div a:hover i {
    transform: scale(1.1);
    color: #dbc4ae;
}

.resume .base .contact div span {
    position: relative;
}

.resume .base .contact div span::after {
    content: "";
    position: absolute;
    background: #fdd835;
    height: 1px;
    width: 0;
    bottom: 0;
    left: 0;
    transition-duration: 0.3s;
}

.resume .base .follow .box {
    text-align: center;
    vertical-align: middle;
}

.resume .base .follow .box a {
    display: inline-block;
    vertical-align: text-bottom;
}

.resume .base .follow .box a:hover i {
    background: #fdd835;
    border-radius: 5px;
    transform: rotate(45deg) scale(0.8);
}

.resume .base .follow .box a:hover i::before {
    transform: rotate(-45deg) scale(1.5);
}

.resume .base .follow .box i {
    display: inline-block;
    font-size: 30px;
    background: #ffb300;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    line-height: 60px;
    color: #303030;
    margin: 0 10px 10px 10px;
    transition-duration: 0.3s;
}

.resume .base .follow .box i::before {
    transition-duration: 0.3s;
}

.resume .base .follow .box i.fa::before {
    display: block;
}

/* --- .func container --- */
.resume .func {
    width: 70%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

@media (max-width: 768px) {
    .resume .func {
        width: 100%;
        padding: 15px 10px;
        gap: 15px;
    }

    .func-section {
        padding: 15px;
    }

    .func-section ul li {
        padding-left: 20px;
        padding-bottom: 10px;
        font-size: 0.9em;
    }

    .func-section ul li::before {
        width: 6px;
        height: 6px;
        border-width: 2px;
    }
}

/* --- Row container for side-by-side sections --- */
.func-row {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    width: 100%;
}

@media (max-width: 768px) {
    .func-row {
        flex-direction: column;
        gap: 20px;
    }

    .func-row>.func-section {
        flex-basis: 100%;
    }
}

/* --- Styling for individual sections within .func --- */
.func-section {
    background: #303030;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 8px;
    transition: all 0.3s ease, box-shadow 0.3s;
    position: relative;
    z-index: 1;
}



.func-section.active {
    background: #dbc4ae;
    color: #303030;
    box-shadow: 0 4px 32px 0 rgba(219, 196, 174, 0.18), 0 0 0 2px #c68c05;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.func-section.active h3,
.func-section.active h4,
.func-section.active span,
.func-section.active p,
.func-section.active li {
    color: #303030 !important;
}

@media (max-width: 768px) {

    /* Removed .func-section:hover and :focus-within for mobile as well */
    .func-section.active {
        background: #dbc4ae;
        color: #303030;
        box-shadow: 0 2px 16px 0 rgba(219, 196, 174, 0.14), 0 0 0 1.5px #c68c05;
    }
}

/* Improve section headings */
.func-section h3 {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(219, 196, 174, 0.1);
}

.func-section h3 i {
    background: rgba(197, 108, 13, 0.15);
    color: #dbc4ae;
    margin-right: 12px;
    transition: all 0.3s ease;
}

/* Sections within a .func-row (intended for side-by-side) */
.func-row>.func-section {
    flex-basis: calc(50% - 12.5px);
}

/* Sections that are direct children of .func (intended for full width) */
.resume .func>.func-section {
    width: 100%;
}

.resume .func h3 {
    transition-duration: 0.3s;
    margin-top: 0;
}

.resume .func h3 i {
    color: #303030;
    background: #c56c0db1;
    width: 42px;
    height: 42px;
    font-size: 20px;
    line-height: 42px;
    border-radius: 50%;
    text-align: center;
    vertical-align: middle;
    margin-right: 8px;
    transition-duration: 0.3s;
}


.func-section ul {
    list-style-type: none;
    padding-left: 0;
}

.func-section ul li {
    position: relative;
    margin-left: 15px;
    padding-left: 25px;
    padding-bottom: 15px;
}

/* Improved spacing for list items in Notable Experience, Qualifications */
.func-section.work ul li span,
/* Job Title / Degree Name */
.func-section.edu ul li span {
    display: block;
    /* Make it block to allow <br> inside if needed */
    margin-bottom: 4px;
    color: #c0c0c0;
    /* Slightly lighter for emphasis */
}

.func-section.work ul li small,
/* Company / Institution */
.func-section.edu ul li small {
    display: block;
    line-height: 1.4;
    margin-top: 2px;
    font-size: 0.9em;
    color: #909090;
    transition: color 0.3s ease;
}


.func-section.work ul li>small:last-of-type,
/* Date, direct child of li */
.func-section.edu ul li>small:last-of-type {
    /* Date, direct child of li */
    color: #808080;
    /* Dimmer for dates */
}

/* For linked items where the company is part of the link */
.func-section.work ul li a small {
    color: #909090;
    /* Ensure linked company small tag has same color */
}


.func-section ul li::before {
    content: "";
    display: block;
    position: absolute;
    width: 7px;
    height: 7px;
    border: 3px solid #909090;
    background: #ffb300;
    border-radius: 50%;
    left: 3px;
    top: 0.3em;
    z-index: 1;
}


.func-section ul li:hover::before {
    animation: circle 1.2s infinite;
}

.func-section ul li:hover>span,
/* For non-linked titles */
.func-section ul li a:hover span {
    /* For linked titles */
    color: #fdd835;
}

.func-section ul li a:hover small {
    /* For company names inside links */
    color: #fdd835 !important;
    /* Make sure linked company name also changes color */
}


@keyframes circle {
    from {
        box-shadow: 0 0 0 0px #fdd835;
    }

    to {
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
    }
}

.func-section ul li:first-of-type::before {
    width: 10px;
    height: 10px;
    left: 1px;
}

.func-section ul li:last-of-type {
    padding-bottom: 3px;
}

.func-section ul li:last-of-type::after {
    border-radius: 1.5px;
}

/* ------------- REFERENCES SECTION STYLING ------------- */
.references.func-section p {
    padding-left: 0;
    /* Align with heading */
    margin-left: 0;
    color: #a0a0a0;
    font-style: italic;
}


.skills-prog.func-section ul {
    margin-left: 15px;
}

.skills-prog.func-section ul li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    padding-bottom: 8px;
    margin-left: 0;
    padding-left: 0;
}

.skills-prog.func-section ul li::before,
.skills-prog.func-section ul li::after {
    display: none;
}

.skills-prog.func-section ul li span {
    display: block;
    width: 120px;
    transition: color 0.3s ease;
}

.skills-prog.func-section ul li:hover span {
    color: #c68c05;
}

.skills-prog.func-section ul li:hover .skills-bar .bar {
    background: #c68c05;
    box-shadow: 0 0 0 1px #c68c05;
}

.skills-prog.func-section ul li .skills-bar {
    background: #404040;
    height: 2px;
    width: calc(100% - 120px);
    position: relative;
    border-radius: 2px;
    margin-left: 10px;
}

.skills-prog.func-section ul li .skills-bar .bar {
    transition: all 0.3s ease;
}

.skills-prog.func-section ul li .skills-bar .bar {
    position: absolute;
    top: -1px;
    height: 4px;
    background: #ffb300;
    border-radius: 5px;
    width: 0;
    will-change: width, background;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.1s;
}

.skills-soft.func-section ul {
    display: flex;
    justify-content: space-between;
    text-align: center;
    margin-left: 0;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .skills-soft.func-section ul li {
        width: 48%;
        margin-bottom: 15px;
    }

    .skills-soft.func-section ul li svg {
        width: 80%;
    }

    .skills-soft.func-section ul li span,
    .skills-soft.func-section ul li small {
        font-size: 0.9em;
    }

    .skills-prog.func-section ul li {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 12px;
    }

    .skills-prog.func-section ul li .skills-bar {
        width: 100%;
        margin-left: 0;
        margin-top: 6px;
        height: 4px;
    }

    .skills-prog.func-section ul li span {
        width: 100%;
        margin-bottom: 4px;
        font-size: 0.9em;
    }
}

.skills-soft.func-section ul li {
    position: relative;
    width: 23%;
    padding-bottom: 0;
    margin-left: 0;
    padding-left: 0;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skills-soft.func-section ul li::before,
.skills-soft.func-section ul li::after {
    display: none;
}

.skills-soft.func-section ul li:hover svg .cbar {
    stroke: #c68c05;
    stroke-width: 3px;
    transition: stroke 0.3s ease, stroke-width 0.3s ease;
}

.skills-soft.func-section ul li:hover span,
.skills-soft.func-section ul li:hover small {
    color: #dbc4ae;
    transform: translate(-50%, -50%);
}

.skills-soft.func-section ul li svg {
    width: 95%;
    fill: transparent;
    transform: rotate(-90deg);
    transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.skills-soft.func-section ul li svg.spinning {
    animation: spin-svg 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes spin-svg {
    0% {
        transform: rotate(-90deg);
    }

    100% {
        transform: rotate(270deg);
    }
}

.skills-soft.func-section ul li svg circle {
    stroke-width: 3px;
    stroke: #909090;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.skills-soft.func-section ul li svg .cbar {
    stroke-width: 3px;
    stroke: #ffb300;
    stroke-linecap: round;
}

.skills-soft.func-section ul li span,
.skills-soft.func-section ul li small {
    position: absolute;
    display: block;
    width: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: color 0.3s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
    pointer-events: none;
}

.skills-soft.func-section ul li span {
    top: 42%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    margin-top: -2px;
}

.skills-soft.func-section ul li small {
    top: 56%;
    font-size: 0.85em;
}


.interests.func-section .interests-items {
    box-sizing: border-box;
    padding: 0 0 15px;
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: space-around;
}

.interests.func-section .interests-items div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: auto;
    min-width: 80px;
    height: 100px;
}

.interests.func-section .interests-items div:hover i {
    transform: scale(1.2);
}

.interests.func-section .interests-items div:hover span {
    color: #fdd835;
    transition-duration: 0.3s;
}

.interests.func-section .interests-items div i {
    font-size: 45px;
    width: 60px;
    height: 60px;
    line-height: 60px;
    color: #909090;
    transition-duration: 0.3s;
}

@media (max-width: 768px) {
    .interests.func-section .interests-items {
        flex-wrap: wrap;
        gap: 15px;
    }

    .interests.func-section .interests-items div {
        min-width: 60px;
        height: 80px;
    }

    .interests.func-section .interests-items div i {
        font-size: 32px;
        width: 45px;
        height: 45px;
        line-height: 45px;
    }

    .interests.func-section .interests-items div span {
        font-size: 0.9em;
    }
}

.interests.func-section .interests-items div span {
    display: block;
}

/* ------------- Other Page Styles (Gallery, Nav, Grid - Unchanged) ------------- */
body {
    background-color: #303030;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* ------------- EMPLOYMENT HISTORY SECTION STYLING ------------- */
.job-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.job-item {
    background: linear-gradient(135deg, #353535 0%, #303030 100%);
    padding: 14px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: grid;
    grid-template-columns: auto minmax(200px, 2fr) minmax(150px, 1fr) auto;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(198, 140, 5, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .job-item {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        gap: 8px;
        padding: 12px 14px;
        font-size: 0.9em;
        border-radius: 8px;
    }

    .job-item i {
        grid-row: 1;
        grid-column: 1;
    }

    .job-item .job-title-text,
    .job-item a.job-title-text {
        grid-row: 1;
        grid-column: 2;
        padding-right: 0;
    }

    .job-item small:nth-of-type(1) {
        grid-row: 2;
        grid-column: 2;
        padding-right: 0;
    }

    .job-item small:nth-of-type(2) {
        grid-row: 1;
        grid-column: 2;
        justify-self: end;
    }
}

.job-item i {
    grid-column: 1;
    color: #c68c05;
    font-size: 0.9em;
}

.job-item .job-title-text,
.job-item a.job-title-text {
    grid-column: 2;
    color: #ddd;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
    text-decoration: none;
}

.job-item a.job-title-text:hover {
    color: #c68c05;
}

.job-item small {
    font-size: 0.85em;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.job-item small:nth-of-type(1) {
    grid-column: 3;
    font-style: italic;
    padding-right: 10px;
}

.job-item small:nth-of-type(2) {
    grid-column: 4;
    justify-self: end;
    opacity: 0.8;
}

.job-item:hover {
    background: linear-gradient(135deg, #404040 0%, #383838 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(198, 140, 5, 0.2), 0 2px 8px rgba(0, 0, 0, 0.2);
    border-color: rgba(198, 140, 5, 0.3);
}

/* ------------- MODAL STYLING ------------- */
.modal-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 15, 0.9);
    z-index: 2100;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    padding: 20px;
    overflow-y: auto;
}

.modal-container.show {
    display: flex;
    opacity: 1;
}

.modal {
    background: linear-gradient(135deg, #282828 0%, #252525 100%);
    border-radius: 16px;
    width: 90%;
    max-width: 850px;
    max-height: 90vh;
    position: fixed;
    z-index: 2110;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(198, 140, 5, 0.1);
    margin: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(-30px) scale(0.95);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(198, 140, 5, 0.2);
}

@media (max-width: 768px) {
    .modal {
        width: 95%;
        margin: 10px;
    }

    .modal-header {
        padding: 12px 15px;
    }

    .modal-header h2 {
        font-size: 1.2em;
    }

    .modal-content {
        padding: 12px 15px;
        font-size: 0.9em;
    }
    
    .modal-content .job-duties-section,
    .modal-content .projects-section,
    .modal-content .software-section,
    .modal-content .overview-section {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .modal-content .client-grid ul {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .modal-content h3 {
        font-size: 1.2em;
    }

    .modal-content h4 {
        font-size: 1em;
    }
    
    .modal-content h5 {
        font-size: 0.95em;
        margin-bottom: 10px;
    }

    .modal-content ul li {
        padding-left: 20px;
        margin-bottom: 8px;
    }

    .close-modal {
        width: 28px;
        height: 28px;
        font-size: 1.2em;
    }
}

.modal-container.show .modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-header {
    padding: 24px 30px;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: linear-gradient(135deg, #303030 0%, #2a2a2a 100%);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.modal-header h2 {
    margin: 0;
    color: #dbc4ae;
    font-size: 1.6em;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
    margin-right: 20px;
}

.modal-subtitle {
    color: #aaa;
    font-size: 1em;
    margin-top: 6px;
    font-weight: 400;
}

.close-modal {
    background: none;
    border: none;
    color: #909090;
    font-size: 1.8em;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.close-modal:hover {
    background: rgba(196, 140, 5, 0.2);
    color: #c68c05;
    transform: rotate(90deg) scale(1.1);
}

.modal-content {
    padding: 25px 30px;
    color: #c0c0c0;
    line-height: 1.7;
    overflow-y: auto;
    flex-grow: 1;
    max-height: calc(90vh - 80px);
    scroll-behavior: smooth;
}

.modal-content h3 {
    color: #dbc4ae;
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 12px;
    font-weight: 600;
    text-transform: none;
    border-bottom: 2px solid #c68c05;
    padding-bottom: 8px;
}

.modal-content h4 {
    color: #b5b5b5;
    font-size: 1.2em;
    margin-top: 20px;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: none;
}

.modal-content h4 small {
    font-size: 0.9em;
    color: #888;
    display: block;
    margin-top: 4px;
    font-weight: 400;
}

.modal-content h4+p:has(em) {
    font-style: italic;
    color: #aaa;
    font-size: 1em;
    margin-top: 5px;
    margin-bottom: 25px;
    padding: 12px 16px;
    background: rgba(198, 140, 5, 0.1);
    border-left: 3px solid #c68c05;
    border-radius: 4px;
}

.modal-content h4+p em {
    font-style: normal;
    font-weight: 500;
}

.modal-content p {
    margin-bottom: 18px;
    color: #c8c8c8;
    font-size: 1.05em;
}

.modal-content p strong {
    color: #c68c05;
    font-weight: 700;
}

/* Modal content sections for better organization */
.modal-content .job-duties-section,
.modal-content .projects-section,
.modal-content .software-section,
.modal-content .overview-section {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(198, 140, 5, 0.1);
}

.modal-content .job-duties-section {
    background: rgba(198, 140, 5, 0.05);
    border-left: 4px solid #c68c05;
}

.modal-content .projects-section {
    background: rgba(219, 196, 174, 0.03);
    border-left: 4px solid #dbc4ae;
}

.modal-content .software-section {
    background: rgba(176, 176, 176, 0.05);
    border-left: 4px solid #b0b0b0;
}

.modal-content .overview-section {
    background: rgba(192, 192, 192, 0.03);
    border: 1px solid rgba(192, 192, 192, 0.1);
}

.modal-content h5 {
    color: #dbc4ae;
    font-size: 1.1em;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(198, 140, 5, 0.3);
    padding-bottom: 8px;
    display: flex;
    align-items: center;
}

.modal-content h5::before {
    content: "◆";
    color: #c68c05;
    margin-right: 8px;
    font-size: 0.8em;
}

/* Client grid for better project display */
.modal-content .client-grid ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    margin-bottom: 0;
}

.modal-content .client-grid ul li {
    margin-bottom: 8px;
    font-size: 0.95em;
    padding-left: 20px;
}

.modal-content .client-grid ul li::before {
    content: "•";
    font-size: 1em;
    top: 0.1em;
}

/* Software section styling */
.modal-content .software-section p {
    font-family: 'Courier New', monospace;
    background: rgba(53, 53, 53, 0.3);
    padding: 12px 16px;
    border-radius: 6px;
    color: #c68c05;
    font-weight: 500;
    margin-bottom: 0;
    border: 1px solid rgba(198, 140, 5, 0.2);
}

/* Styling for "Projects:" or "Projects (Selected Clients):" headings in modal */
.modal-content h4:not(:first-of-type):not(h3 + h4) {
    /* Targets H4s that are section heads like "Projects" */
    color: #dbc4ae;
    font-size: 1.25em;
    margin-top: 35px;
    margin-bottom: 18px;
    padding-top: 18px;
    border-top: 1px solid #555;
    font-weight: 600;
    position: relative;
}

.modal-content h4:not(:first-of-type):not(h3 + h4)::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #c68c05, transparent);
}


.modal-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 25px;
}

.modal-content ul li {
    margin-bottom: 14px;
    position: relative;
    padding-left: 28px;
    color: #c0c0c0;
    line-height: 1.7;
    font-size: 1.05em;
}

.modal-content ul li::before {
    content: "▸";
    position: absolute;
    left: 0;
    top: 0.2em;
    color: #c68c05;
    font-size: 1.1em;
    font-weight: bold;
}

/* Custom scrollbar styling for modal */
.modal-content::-webkit-scrollbar {
    width: 10px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(53, 53, 53, 0.5);
    border-radius: 5px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(219, 196, 174, 0.2);
    border-radius: 5px;
    border: 2px solid rgba(53, 53, 53, 0.5);
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(219, 196, 174, 0.3);
}

.modal-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(219, 196, 174, 0.2) rgba(53, 53, 53, 0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gallery Styles for VFX Editing and DIT pages */
.gallery-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    justify-items: center;
}

.gallery-item {
    width: 100%;
    max-width: 300px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #353535;
    aspect-ratio: 3/4; /* Changed to portrait aspect ratio to better fit the images */
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.gallery-item a {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fill the entire container */
    display: block;
    transition: transform 0.3s ease;
    background: #353535;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }

    .gallery-item {
        aspect-ratio: 4/3;
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .gallery-item {
        max-width: 100%;
        aspect-ratio: 4/3;
    }
}

/* Ensure profile picture does not spin or blur when hovering over the heading */
.animated-name:hover + .profile .photo img {
    transform: none !important;
    filter: none !important;
}