/* Typewriter effect */
.typewriter-container {
    display: inline-flex;
    font-family: 'Abhaya Libre', 'Georgia', serif;
}

#typewriter-cursor {
    animation: blink-caret 0.75s step-end infinite;
    margin-left: 2px;
    color: black;
}

@keyframes blink-caret {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

/* Down arrow Scrolling indicator */
.scroll-indicator {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 5rem;
    animation: floatDown 2s infinite;
    color: #323232;
}

@keyframes floatDown {
    0% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
}

/* Back-to-top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #555;
    transform: translateY(-2px);
}

/* Floating images */
.floating-interest {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    animation: fallDown 3s linear forwards;
}

@keyframes fallDown {
    0% {
        transform: translateY(-100px) translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(0) rotate(360deg);
        opacity: 0;
    }
}

/* Dark Mode Button */
.theme-toggle {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: #333;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: #555;
}

/* DARK MODE */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* Nav */
body.dark-mode .nav-panel {
    background: rgba(45, 55, 72, 0.95);
}

body.dark-mode .nav-links a {
    background: #354156;
    color: #90cdf4;
}

body.dark-mode .nav-links a:hover {
    background: #4a5568;
    color: #bee3f8;
}

body.dark-mode .nav-toggle {
    background: #2d3748;
    color: #90cdf4;
}

body.dark-mode .logo a {
    color: #90cdf4;
}

/* Sections and layout */
body.dark-mode .section {
    background-color: #1a1a1a;
}

body.dark-mode #home {
    background-color: #1a1a1a;
}

body.dark-mode #contact {
    background-color: #1a1a1a;
}

body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3 {
    color: #ffffff;
}

/* Styling */
body.dark-mode .prompt {
    color: rgb(190, 185, 185);
}

body.dark-mode .interests-gallery {
    border: 8px double pink;
    background: rgba(111, 106, 106, 0.664);
}

/* Projects */
body.dark-mode .project1-card,
body.dark-mode .project2-card,
body.dark-mode .project3-card {
    background: rgba(45, 55, 72, 0.95);
    border: 10px groove #212849;
}

/* Form */
body.dark-mode input,
body.dark-mode textarea {
    background-color: #333;
    color: #e0e0e0;
    border-color: #555;
}

body.dark-mode input:focus,
body.dark-mode textarea:focus {
    border-color: #666;
    background-color: #3a3a3a;
}

/* Back-to-top button */
body.dark-mode .back-to-top {
    background-color: #444;
    color: #e0e0e0;
}

body.dark-mode .back-to-top:hover {
    background-color: #555;
}

/* Links + Social */
body.dark-mode div.social-links a, 
body.dark-mode div.home-text a,
body.dark-mode div.project-links a {
    color: pink;
}

body.dark-mode .social-links img {
    background-color: white;
    border-radius: 5px;
    padding: 2px;
}

/* Images and icons */
body.dark-mode .home-image img {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 30px pink;
}

body.dark-mode .star {
    color: gold;
}

body.dark-mode #typewriter-cursor {
    color: white;
}

body.dark-mode .scroll-indicator {
    color: whitesmoke;
}