/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    background: rgba(64, 46, 122, 0.9);
    backdrop-filter: blur(10px);
    transition: background-color 0.3s ease;
    animation: slideInFromTop 0.5s ease-out;
}

/* Logo */
.logo-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.logo-link:hover {
    text-decoration: none;
}

.logo {
    font-size: 24px;
    color: #62d9ff;
    text-shadow: 0 0 10px #3dc2ec;
    transition: transform 0.3s ease-in-out;
    cursor: url('images/bowman.png') 16 16, auto;
    white-space: nowrap;
    margin-right: 20px;
    width: auto;
    overflow: visible;
    position: relative;
}

.logo:hover {
    transform: scale(1.1);
}

#extra-text {
    position: absolute;
    left: 100%;
    white-space: nowrap;
    overflow: hidden;
    vertical-align: bottom;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#extra-text.typing {
    opacity: 1;
}

/* Navigation Links */
#main-nav {
    flex-grow: 1;
}

.nav-links {
    list-style-type: none;
    padding: 0;
    display: flex;
    margin: 0;
    justify-content: center;
}

.nav-links li {
    margin: 0 15px;
    position: relative;
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

.nav-links li:nth-child(1) { animation-delay: 0.1s; }
.nav-links li:nth-child(2) { animation-delay: 0.2s; }
.nav-links li:nth-child(3) { animation-delay: 0.3s; }
.nav-links li:nth-child(4) { animation-delay: 0.4s; }

.nav-links li > a {
    font-size: 16px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: default;
}

.nav-links li > a:hover {
    color: #62d9ff;
    font-weight: bold;
    font-size: 17px;
    animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Custom Cursors for Navigation */
.nav-links li.dropdown:nth-child(1) > a { 
    cursor: url('images/ai.webp') 16 16, auto; 
}

.nav-links li.dropdown:nth-child(2) > a { 
    cursor: url('images/python.webp') 16 16, auto; 
}

/* Dropdown Styles */
.nav-links .dropdown {
    position: relative;
}

.nav-links .dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(64, 46, 122, 0.9);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    list-style-type: none;
    padding: 0;
}

.nav-links .dropdown:hover .dropdown-content {
    display: block;
}

.nav-links .dropdown-content a {
    color: white;
    padding: 12px 16px;
    display: block;
    transition: background-color 0.3s;
}

.nav-links .dropdown-content a:hover {
    background-color: rgba(98, 217, 255, 0.2);
}

/* Dark Mode Toggle - Wider and Thinner Design */
.dark-mode-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: url('images/sunglasses.png') 16 16, auto;
    width: 80px;
    height: 24px;
    position: relative;
    outline: none;
}

.dark-mode-toggle:focus {
    outline: none;
    box-shadow: none;
}

.toggle-track {
    background-color: #1e293b;
    border-radius: 12px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border: 2px solid #334155;
}

.toggle-indicator {
    width: 20px;
    height: 20px;
    background-color: #94a3b8;
    border-radius: 2px;
    position: absolute;
    left: 2px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

body.dark-mode .toggle-track {
    background-color: #0f172a;
    border-color: #1e293b;
}

body.dark-mode .toggle-indicator {
    transform: translateX(56px);
    background-color: #60a5fa;
}

/* Mobile Menu Icon */
.menu-icon {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    background: transparent;
    border: none;
}

.menu-icon div {
    width: 100%;
    height: 3px;
    background-color: white;
    transition: all 0.3s;
}

/* Mobile Navigation Overlay */
#mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100% - 60px);
    background-color: rgba(64, 46, 122, 0.95);
    z-index: 999;
    overflow-y: auto;
    transition: all 0.3s ease;
}

#mobile-nav-overlay.active {
    display: flex;
    flex-direction: column;
}

#mobile-nav-overlay #mobile-nav {
    flex-grow: 1;
    padding-top: 40px;
}

#mobile-nav-overlay .nav-links {
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

#mobile-nav-overlay .nav-links li {
    margin: 15px 0;
    width: 100%;
}

#mobile-nav-overlay .nav-links li a {
    font-size: 18px;
    display: block;
    padding: 10px;
    text-align: center;
}

#mobile-nav-overlay .dropdown-content {
    position: static;
    background-color: rgba(98, 217, 255, 0.1);
    display: none;
    margin-top: 10px;
}

#mobile-nav-overlay .dropdown.active .dropdown-content {
    display: block;
}

#close-mobile-menu {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    z-index: 1001;
    line-height: 1;
}

#close-mobile-menu::after {
    content: "\00D7";
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    #main-nav {
        display: none;
    }

    #mobile-nav-overlay.active #mobile-nav {
        display: block;
    }

    .menu-icon {
        display: flex;
    }

    header {
        height: 60px;
    }

    .header-controls {
        display: flex;
        align-items: center;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        background: transparent;
    }

    .menu-icon, .dark-mode-toggle {
        margin-left: 10px;
        background: transparent;
    }

    .dark-mode-toggle {
        width: 60px;
        height: 22px;
    }

    .toggle-indicator {
        width: 18px;
        height: 18px;
        left: 2px;
    }

    body.dark-mode .toggle-indicator {
        transform: translateX(38px);
    }
}

/* Dark Mode Styles */
body.dark-mode header {
    background: rgba(0, 0, 0, 0.9);
}

body.dark-mode .nav-links .dropdown-content {
    background-color: rgba(0, 0, 0, 0.9);
}

body.dark-mode #mobile-nav-overlay {
    background-color: rgba(0, 0, 0, 0.95);
}

body.dark-mode #mobile-nav-overlay .dropdown-content {
    background-color: rgba(98, 217, 255, 0.05);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInFromTop {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for better keyboard navigation */
a:focus,
button:focus,
input:focus {
    outline: 2px solid #62d9ff;
    outline-offset: 2px;
}

/* Skip to main content link for accessibility */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #62d9ff;
    color: #000;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
}

/* Print styles */
@media print {
    header {
        position: static;
        background: none;
        color: #000;
    }

    .nav-links,
    .dark-mode-toggle,
    .menu-icon {
        display: none;
    }

    .logo {
        font-size: 18px;
        color: #000;
        text-shadow: none;
    }
}

/* High contrast mode */
@media (forced-colors: active) {
    header {
        background: Canvas;
        border-bottom: 1px solid CanvasText;
    }

    .nav-links li a,
    .logo,
    .toggle-icon {
        color: CanvasText;
    }

    .toggle-track {
        background: Canvas;
        border: 1px solid CanvasText;
    }

    .toggle-indicator {
        background: CanvasText;
    }
}

/* end of code */