/* ---------------------------------------------
   CSS Variables
--------------------------------------------- */
:root {
    --background-color: #0D1B2A;
    --text-color: #E0E1DD;
    --text-color-light: #A9A9A9;
    --primary-color: #C0C0C0; /* Robotic Silver */
    --secondary-color: #415A77;
    --secondary-color-hover: #5A7A9A;
    --header-bg: #1B263B;
    --main-bg: #1B263B;
    --footer-bg: #1B263B;
    --link-color: #C0C0C0;
    --link-hover-color: #FFFFFF;
    --social-icon-color: #E0E1DD;
    --social-icon-hover-color: #C0C0C0;
    --box-shadow-color: rgba(0, 0, 0, 0.2);
    --story-box-bg: #1B263B;
    --story-box-border: #415A77;
    --story-box-arrow: #1B263B;
    --button-text-color: #0D1B2A;
    --skills-header-bg: #415A77;
    --skills-header-bg-hover: #5A7A9A;
    --nav-bg: #1B263B;
    --nav-link-color: #E0E1DD;
    --nav-link-hover-color: #C0C0C0;
    --nav-box-shadow: rgba(0, 0, 0, 0.2);
    --subnav-bg: #415A77;
}

/* ---------------------------------------------
   Global Styles
--------------------------------------------- */
html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding-top: 65px;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* ---------------------------------------------
   Navigation Styles
--------------------------------------------- */
nav {
    background-color: var(--nav-bg);
    padding: 10px 20px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 2500;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    box-shadow: 0 0 10px var(--nav-box-shadow);
    transition: top 0.3s, background-color 0.3s ease, box-shadow 0.3s ease;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: var(--nav-link-color);
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    transition: color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--nav-link-hover-color);
    background-color: var(--secondary-color);
    padding: 5px 10px;
    border-radius: 5px;
}

#nav2 {
    display: none;
    top: 45px;
    background-color: var(--subnav-bg);
    z-index: 999;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 8px var(--nav-box-shadow);
    padding: 10px 0;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#nav2 ul {
    display: flex;
    margin: 0;
    padding: 0 25px;
}

#nav2 ul li {
    margin: 0 10px;
}

.theme-switcher {
    background: none;
    border: none;
    color: var(--nav-link-color);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2501;
}

.theme-switcher:hover {
    color: var(--nav-link-hover-color);
}

/* ---------------------------------------------
   Header Styles
--------------------------------------------- */
header {
    max-width: 800px;
    margin: 0 auto 20px auto;
    padding: 20px;
    text-align: center;
    background-color: var(--header-bg);
    box-shadow: 0 2px 4px var(--box-shadow-color);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.8s ease-in-out;
}

.header-text {
    text-align: left;
    flex: 1;
    padding-right: 20px;
}

.header-text h1 {
    font-size: 48px;
    margin: 0 0 10px 0;
    color: var(--text-color);
    font-weight: 700;
}

.header-text p {
    font-size: 20px;
    margin: 0 0 20px 0;
    color: var(--text-color);
    line-height: 1.5;
}

.header-logo-social {
    text-align: center;
    padding: 0;
}

.logo-container {
    margin-bottom: 15px;
}

.logo {
    width: 150px;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 0 8px var(--box-shadow-color);
}

.social-icons a {
    color: var(--social-icon-color);
    margin: 0 8px;
    font-size: 20px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--social-icon-hover-color);
}

/* ---------------------------------------------
   Main Content Styles
--------------------------------------------- */
main {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--main-bg);
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--box-shadow-color);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.8s ease-in-out;
}

.section {
    margin: 40px 0;
}

.section h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 20px;
}

.section h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    cursor: pointer;
    position: relative;
}

.section p,
.section li {
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 10px;
    line-height: 1.5;
}

.section div,
.section article {
    margin-bottom: 20px;
}

.section .date {
    display: none;
    font-weight: normal;
    margin-left: 10px;
    color: var(--text-color-light);
}

.section h3:hover .date,
.section h3:focus .date {
    display: inline;
}

.category {
    background-color: var(--main-bg);
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid var(--secondary-color);
    box-shadow: 0 2px 5px var(--box-shadow-color);
    margin-bottom: 20px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.category h3 {
    margin-bottom: 10px;
}

.category p {
    margin-bottom: 10px;
}

.category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category li {
    margin-bottom: 8px;
    padding-left: 5px;
}

.category a {
    font-size: 14px;
    color: var(--link-color);
    text-decoration: none;
}

.category a:hover {
    text-decoration: underline;
}

.category i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* ---------------------------------------------
   Image Gallery Styles
--------------------------------------------- */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.image-gallery h2 {
    margin-bottom: 20px;
    grid-column: span 2;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    align-items: center;
    justify-items: center;
    position: relative;
}

.gallery img {
    width: 100%;
    max-height: 100px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px var(--box-shadow-color);
}

.image-bounce {
    position: relative;
    display: inline-block;
}

.image-bounce img:hover {
    transform: scale(1.05) translateY(-5px);
    cursor: pointer;
    box-shadow: 0 6px 12px var(--box-shadow-color);
}

.story-box {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 15px);
    width: 300px;
    background-color: var(--story-box-bg);
    color: var(--text-color);
    padding: 10px;
    border: 1px solid var(--story-box-border);
    border-radius: 8px;
    box-shadow: 0 3px 10px var(--box-shadow-color);
    z-index: 999;
    transition: all 0.3s ease;
    pointer-events: none;
    opacity: 0;
}

.story-box.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.story-box::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 10px 10px 10px;
    border-style: solid;
    border-color: transparent transparent var(--story-box-arrow) transparent;
}

/* ---------------------------------------------
   Footer Styles
--------------------------------------------- */
footer {
    text-align: center;
    padding: 15px;
    background-color: var(--footer-bg);
    box-shadow: 0 -2px 5px var(--box-shadow-color);
    margin-top: 20px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.8s ease-in-out;
}

footer p {
    margin: 0;
    font-size: 14px;
    color: var(--text-color-light);
}

/* ---------------------------------------------
   Responsive Adjustments
--------------------------------------------- */
@media (max-width: 768px) {
    nav {
        padding: 10px 0;
        width: 100%;
    }

    nav ul li {
        margin: 0 5px;
    }

    nav ul li a {
        font-size: 14px;
    }

    #nav2 {
        display: none;
        top: 40px;
    }

    header {
        flex-direction: column;
        text-align: center;
    }

    .header-text {
        padding-right: 0;
        margin-bottom: 20px;
    }

    .image-gallery {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------
   Animations
--------------------------------------------- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#photography .photo-gallery {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 20px;
    max-width: 100%;
    margin: 40px 0;
}

#photography .photo-gallery .gallery-item {
    flex: 0 0 auto;
    width: 450px;
}

#photography .photo-gallery .gallery-item img {
    height: 400px;
    object-fit: cover;
}

/* ---------------------------------------------
   PayPal Button
--------------------------------------------- */
.paypal-button {
    display: inline-block;
    background-color: #333;
    color: #ccc;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: normal;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.paypal-button:hover {
    background-color: #555;
}

.social-and-download {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.resume-download-button {
    display: inline-block;
    background-color: #333;
    color: #ccc;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: normal;
    font-size: 14px;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.resume-download-button:hover {
    background-color: #555;
}

.category .expandable {
    position: relative;
}

.category .expandable::after {
    content: '+';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    transition: transform 0.3s ease-in-out;
}

.category .expandable.open::after {
    transform: translateY(-50%) rotate(45deg);
}

.category .expandable {
    position: relative;
}

.category .expandable::after {
    content: '+';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    transition: transform 0.3s ease-in-out;
}

.category .expandable.open::after {
    transform: translateY(-50%) rotate(45deg);
}

.category .expandable {
    position: relative;
}

.category .expandable::after {
    content: '+';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    transition: transform 0.3s ease-in-out;
}

.category .expandable.open::after {
    transform: translateY(-50%) rotate(45deg);
}

.category .expandable {
    position: relative;
}

.category .expandable::after {
    content: '+';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    transition: transform 0.3s ease-in-out;
}

.category .expandable.open::after {
    transform: translateY(-50%) rotate(45deg);
}

.category .expandable + ul {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.category .expandable.open + ul {
    max-height: 500px; /* Adjust as needed */
}