:root {
    --text-color: #a0e0e0;
    --accent-color: #ffffff;
    --bg-color: #000510;
}

body {
    font-family: 'Josefin Sans', sans-serif;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--bg-color);
}

.content-wrapper {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 2;
}

.main-title {
    font-size: 6rem;
    font-weight: 600;
    letter-spacing: 1.5rem;
    margin: 0;
    text-transform: uppercase;
    color: #fff;
    text-shadow:
        0 4px 8px rgba(0, 0, 0, 0.9),
        0 8px 16px rgba(0, 0, 0, 0.7),
        0 12px 24px rgba(0, 0, 0, 0.6),
        0 16px 32px rgba(0, 0, 0, 0.5);
    animation: neonPulse 2s ease-in-out infinite alternate;
}

.subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5rem;
    margin-top: 1rem;
    color: #fff;
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: center;
    text-shadow:
        0 3px 6px rgba(0, 0, 0, 0.9),
        0 6px 12px rgba(0, 0, 0, 0.7),
        0 9px 18px rgba(0, 0, 0, 0.6),
        0 12px 24px rgba(0, 0, 0, 0.5);
}

.separator {
    color: #ddd;
    font-weight: 500;
    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.7);
}

.bottom-nav {
    position: absolute;
    bottom: 50px;
    display: flex;
    gap: 4rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
}

.bottom-nav a {
    color: #ddd;
    text-decoration: none;
    font-weight: 600;
    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.7),
        0 0 15px rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.bottom-nav a:hover {
    color: #fff;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 1),
        0 0 20px rgba(255, 255, 255, 0.8),
        0 0 30px rgba(255, 255, 255, 0.6),
        0 0 40px rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
        letter-spacing: 0.5rem;
    }

    .subtitle {
        font-size: 0.7rem;
        gap: 1rem;
        flex-direction: column;
    }

    .separator {
        display: none;
    }

    .bottom-nav {
        gap: 1.5rem;
        font-size: 0.6rem;
    }
}

@keyframes neonPulse {
    from {
        text-shadow:
            0 0 10px rgba(255, 255, 255, 0.8),
            0 0 20px rgba(255, 255, 255, 0.6),
            0 0 30px rgba(255, 255, 255, 0.4),
            0 0 40px rgba(255, 255, 255, 0.2);
    }

    to {
        text-shadow:
            0 0 15px rgba(255, 255, 255, 1),
            0 0 30px rgba(255, 255, 255, 0.8),
            0 0 45px rgba(255, 255, 255, 0.6),
            0 0 60px rgba(255, 255, 255, 0.4);
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 5, 16, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    animation: fadeIn 0.3s ease-in-out;
    overflow-y: auto;
    padding: 40px 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.modal.closing {
    animation: fadeOut 0.3s ease-in-out forwards;
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

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

@keyframes slideOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(-30px);
        opacity: 0;
    }
}

.modal.closing .modal-content {
    animation: slideOut 0.3s ease-in forwards;
}

.modal-content {
    background: none;
    padding: 200px 60px 250px 60px;
    max-width: 1400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: none;
    animation: slideIn 0.4s ease-out;

    /* Hide scrollbar for Firefox */
    scrollbar-width: none;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.modal-content::-webkit-scrollbar {
    display: none;
}

.modal-content h2 {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 40px 0;
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    text-shadow:
        0 0 15px rgba(255, 255, 255, 0.8),
        0 0 30px rgba(255, 255, 255, 0.4);
    text-align: center;
}

.modal-content h3 {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #fff;
    margin: 40px 0 30px 0;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    text-shadow:
        0 0 12px rgba(255, 255, 255, 0.7),
        0 0 25px rgba(255, 255, 255, 0.3);
    text-align: center;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 60px;
    align-items: center;
    text-align: center;
}

.photo-section {
    flex-shrink: 0;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 0 20px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(26, 47, 90, 0.4);
}

.bio-section {
    max-width: 700px;
}

.modal-content p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    line-height: 1.9;
    color: #e8e8e8;
    margin-bottom: 20px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.tools-section {
    margin-top: 50px;
    padding-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.tools-section h3 {
    font-size: 1.3rem;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.15rem;
    font-weight: 400;
}

.tools-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: transparent;
    border-radius: 12px;
    border: none;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.tool-item:hover {
    background: transparent;
    transform: translateY(-5px);
    opacity: 1;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
}

.tool-item img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.tool-item span {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e8e8e8;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    text-align: center;
    line-height: 1.6;
}

/* Clickable certification badges */
a.tool-item {
    text-decoration: none;
    cursor: pointer;
}

a.tool-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Modal Bottom Navigation */
.modal-bottom-nav {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 60px;
    font-family: 'Montserrat', sans-serif;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 40px;
}

.modal-nav-link {
    color: #ddd;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.15rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.nav-separator {
    color: #666;
    font-weight: 300;
    font-size: 0.9rem;
}

.modal-nav-link:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        padding: 40px 30px;
        max-width: 95%;
    }

    .modal-body {
        flex-direction: column;
        align-items: center;
    }

    .profile-photo {
        width: 200px;
        height: 200px;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 20px;
    }

    .tool-item img {
        width: 60px;
        height: 60px;
    }
}

/* Contact Section Styles */
.contact-section {
    margin-top: 60px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.contact-header {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.3rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 300;
}

.social-icons {
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: center;
}

.social-icon {
    color: #ddd;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.social-icon:hover {
    color: #fff;
    transform: translateY(-3px);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

/* Theme Toggle Button */
.theme-toggle-btn {
    position: fixed;
    bottom: 150px;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    width: auto;
    height: auto;
    padding: 10px 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.15rem;
    color: #ddd;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: translateX(-50%) translateY(-2px);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* Start Screen */
#start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000510;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease;
    cursor: pointer;
}

.start-content {
    text-align: center;
    color: white;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.2em;
}

.start-content h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.start-content p {
    font-size: 1rem;
    font-weight: 200;
    opacity: 0.8;
    animation: pulse 2s infinite;
}

#start-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

@keyframes pulse {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.4;
    }
}

/* Volume Control */
#volume-container {
    position: fixed;
    top: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    height: 30px;
    /* Match visual height */
}

#volume-container:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

#volume-icon {
    width: 24px;
    height: 24px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#volume-icon svg {
    width: 20px;
    height: 20px;
}

#volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--theme-color, #fff);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: background 0.3s ease, transform 0.1s ease;
}

#volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

#volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: none;
    border-radius: 50%;
    background: var(--theme-color, #fff);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: background 0.3s ease, transform 0.1s ease;
}

/* Work Grid Styles */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 50px;
    margin-top: 35px;
    width: 100%;
}

/* Center odd item in the last row for desktop */
@media (min-width: 1100px) {
    .work-grid .work-item:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        width: calc(50% - 25px);
        margin: 0 auto;
    }
}

.work-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.work-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.work-item video,
.work-item iframe,
.work-item img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
    background: #000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.work-item span {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #e8e8e8;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    text-align: center;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .work-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .work-item {
        padding: 10px;
    }
}

/* Gallery Grid Styles */
.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    width: 100%;
    max-width: 1200px;
    margin: 40px auto 0;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    height: 100%;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    aspect-ratio: 4/3;
    /* Slightly taller than video for photos, but uniform */
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

@media (max-width: 600px) {
    .gallery-masonry {
        grid-template-columns: 1fr;
    }
}

/* Project Detail Modal Specifics */
#project-detail-modal .modal-content {
    text-align: left;
}

/* Project Trigger Overlay */
.project-trigger .click-overlay {
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    /* Match iframe/video radius */
}

.project-trigger:hover .click-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.project-trigger .click-overlay::after {
    content: "VIEW DETAILS";
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.2rem;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    border-radius: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.project-trigger:hover .click-overlay::after {
    opacity: 1;
    transform: translateY(0);
}