/* Global Styles & Cosmic Variables - Professional Refinement v1.4 (Enhanced, Stabilized, Optimized) */
:root {
    --bg-deep-space: #000208;
    --bg-nebula-tint: rgba(8, 12, 32, 0.96);

    --primary-star-glow: #87CEFA; /* Sky Blue */
    --secondary-star-glow: #E0E0FF; /* Lavender */
    --accent-star-trail: #B0C4DE; /* Light Steel Blue */
    --hdr-highlight: #FFFFFF; /* Pure White for peaks */

    --text-nova-bright: #F0F8FF; /* Alice Blue */
    --text-nebula-soft: #D8E0F0; /* Light Cyan Blue */
    --text-cosmic-dust: #B8C6E0; /* Slightly lighter dust text */

    --modal-border-color: rgba(135, 206, 250, 0.4);
    --modal-shadow-color: rgba(135, 206, 250, 0.25);
    --modal-complex-shadow:
        0 5px 20px rgba(0,0,0,0.55),
        0 0 45px var(--modal-shadow-color),
        inset 0 0 20px rgba(135,206,250,0.15);

    --orb-bg: rgba(20, 30, 60, 0.8);
    --orb-border: rgba(135, 206, 250, 0.85);
    --orb-hover-bg: rgba(35, 55, 95, 0.95);
    --orb-active-glow: 0 0 25px var(--primary-star-glow), 0 0 15px var(--secondary-star-glow);

    --font-primary: 'Montserrat', sans-serif;
    --font-display: 'Orbitron', sans-serif;
    --font-mono: 'Roboto Mono', monospace;

    --transition-celestial: all 0.4s cubic-bezier(0.25, 0.8, 0.5, 1);
    --transition-smooth: all 0.3s ease-out;
}

/* Loading Overlay Styles */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-deep-space); /* Match page background */
    z-index: 10000; /* Highest z-index */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-nova-bright);
    font-family: var(--font-primary);
    transition: opacity 0.5s ease-out 0.3s, visibility 0s 0.8s; /* Delay fade out, hide after fade */
    opacity: 1;
    visibility: visible;
}
#loadingOverlay.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-out, visibility 0s 0.5s;
}
.spinner {
    border: 6px solid rgba(135, 206, 250, 0.2); /* Light base for spinner */
    border-top: 6px solid var(--primary-star-glow); /* Active color */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1.2s linear infinite;
    margin-bottom: 25px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
#loadingOverlay p {
    font-size: 1.2rem;
    text-shadow: 0 0 5px var(--primary-star-glow);
}


/* Prevent Text Selection - User Request */
body {
    user-select: none; /* Standard */
    -webkit-user-select: none; /* Chrome, Safari, Opera */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    -o-user-select: none; /* Old Opera */
    /* Include the rest of the body styles */
    background-color: var(--bg-deep-space);
    color: var(--text-nebula-soft);
    font-family: var(--font-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden; /* Managed by modal JS */
    position: relative;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: 50px; /* Space for the new footer */
}

/* Ensure other interactive elements are still selectable/focusable if needed (e.g. form inputs) */
input, textarea, button, select {
    user-select: auto;
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    -o-user-select: auto;
}


#cosmicCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    touch-action: none; /* Prevent default touch actions like pinch-zoom on canvas */
}

.site-header {
    text-align: center;
    margin-bottom: 40px; /* Slightly more space below header */
    position: relative;
    z-index: 10;
    animation: fadeInHeader 1.8s 0.4s cubic-bezier(0.075, 0.82, 0.165, 1) forwards;
    opacity: 0;
    transform: translateY(-30px); /* Slightly larger initial translation */
}

@keyframes fadeInHeader {
    to { opacity: 1; transform: translateY(0); }
}


.main-name {
    font-family: var(--font-display);
    font-size: clamp(3rem, 9vw, 6.5rem); /* Slightly larger base font */
    font-weight: 700;
    color: var(--hdr-highlight);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    line-height: 1.1;
    text-shadow:
        0 0 8px var(--primary-star-glow), /* Slightly larger shadow */
        0 0 16px rgba(135, 206, 250, 0.5), /* Slightly larger and more opaque outer glow */
        0 0 4px var(--hdr-highlight); /* Slightly larger core highlight */
    animation: pulseName 5s infinite alternate ease-in-out, flickerName 20s infinite linear;
}

@keyframes pulseName {
    0% {
        text-shadow:
            0 0 8px var(--primary-star-glow),
            0 0 15px rgba(135, 206, 250, 0.4), /* Toned down 0% glow */
            0 0 3px var(--hdr-highlight); /* Toned down 0% core */
        transform: scale(1);
    }
    100% {
        text-shadow:
            0 0 12px var(--primary-star-glow), /* Increased 100% glow */
            0 0 25px rgba(135, 206, 250, 0.6), /* Increased 100% outer glow */
            0 0 5px var(--hdr-highlight); /* Increased 100% core */
        transform: scale(1.015);
    }
}

@keyframes flickerName {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.995; } /* More subtle flicker */
    50.1% { opacity: 1; }
    75% { opacity: 0.99; } /* More subtle flicker */
    75.2% { opacity: 1; }
}


.sub-title {
    font-family: var(--font-primary);
    font-size: clamp(1rem, 2.8vw, 1.5rem); /* Slightly larger base font */
    color: var(--text-nova-bright); /* Slightly brighter color as requested */
    margin-top: 10px; /* More space */
    letter-spacing: 0.08em; /* Slightly wider letter spacing */
    font-weight: 400;
    /* Adjusted text shadow for brighter look */
    text-shadow: 0 0 8px rgba(255,255,255,0.5), 0 0 3px var(--primary-star-glow);
    animation: fadeInSubTitle 1.8s 0.8s cubic-bezier(0.075, 0.82, 0.165, 1) forwards, subTitleLevitate 4s ease-in-out infinite alternate; /* Added levitate animation */
    opacity:0;
    transform: translateY(10px); /* Slightly larger initial translation */
}

@keyframes fadeInSubTitle {
  to { opacity:1; transform:translateY(0); }
}

/* New animation for subtitle levitation */
@keyframes subTitleLevitate {
    0% { transform: translateY(0); }
    100% { transform: translateY(-4px); } /* Subtle upward float */
}


.celestial-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(20px, 4.5vw, 50px); /* Slightly larger gap */
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
    padding: 0 20px; /* Increased padding */
    margin-top: 30px; /* Space below header */
}

.celestial-orb {
    background-image: radial-gradient(circle, rgba(40,70,130,0.75) 0%, var(--orb-bg) 70%); /* Slightly more opaque start */
    border: 2px solid var(--orb-border);
    color: var(--primary-star-glow);
    border-radius: 50%;
    width: clamp(80px, 13vw, 110px); /* Slightly larger base size */
    height: clamp(80px, 13vw, 110px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-celestial);
    box-shadow: 0 0 18px var(--orb-border), inset 0 0 16px rgba(135, 206, 250, 0.3), 0 0 6px rgba(0,0,0,0.5); /* Slightly enhanced shadow */
    text-decoration: none;
    font-size: clamp(1.8rem, 3.3vw, 2.2rem); /* Slightly larger icon size */
    opacity: 0;
    transform: scale(0.3) rotate(-30deg);
    animation: emergeOrb 0.9s cubic-bezier(0.215, 0.610, 0.355, 1) forwards;
}

/* Increased animation delays slightly for sequence */
.celestial-orb:nth-child(1) { animation-delay: 1.0s; }
.celestial-orb:nth-child(2) { animation-delay: 1.3s; }
.celestial-orb:nth-child(3) { animation-delay: 1.6s; }
.celestial-orb:nth-child(4) { animation-delay: 1.9s; }

@keyframes emergeOrb {
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.celestial-orb i {
    transition: transform 0.3s ease-out, text-shadow 0.3s ease-out; /* Slightly longer transition */
    text-shadow: 0 0 6px var(--primary-star-glow); /* Slightly stronger default shadow */
}

.celestial-orb span {
    font-size: clamp(0.65rem, 1.5vw, 0.8rem); /* Slightly larger label */
    margin-top: 8px; /* More space */
    font-weight: 500;
    color: var(--text-nebula-soft);
    text-shadow: 0 0 4px var(--bg-deep-space); /* Slightly stronger shadow */
    transition: opacity 0.3s ease, color 0.3s ease; /* Slightly longer transition */
}

.celestial-orb:hover, .celestial-orb:focus-visible {
    background-image: radial-gradient(circle, rgba(60,100,190,0.85) 0%, var(--orb-hover-bg) 70%); /* More opaque hover background */
    border-color: var(--hdr-highlight);
    box-shadow: var(--orb-active-glow), inset 0 0 22px rgba(135, 206, 250, 0.5), 0 0 12px rgba(0,0,0,0.4); /* Enhanced hover shadow */
    transform: scale(1.15) translateY(-8px); /* Slightly more pronounced hover effect */
    outline: none; /* Outline handled by focus-visible pseudoclass */
}
.celestial-orb:hover i, .celestial-orb:focus-visible i {
    transform: scale(1.2) rotate(-8deg); /* Slightly more pronounced icon effect */
    text-shadow: 0 0 10px var(--primary-star-glow), 0 0 6px var(--hdr-highlight); /* Enhanced icon shadow */
}
.celestial-orb:hover span, .celestial-orb:focus-visible span {
    color: var(--hdr-highlight);
    text-shadow: 0 0 6px var(--primary-star-glow); /* Enhanced label shadow */
}

/* Modal Styles - Professional Refinement */
.modal-overlay { /* Renamed from #modalOverlay to .modal-overlay to match JS variable */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 1, 5, 0.85); /* More opaque overlay */
    backdrop-filter: blur(12px) saturate(150%); /* Stronger blur/saturate */
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s 0.4s;
}

.modal-overlay.active { /* Renamed from #modalOverlay.active */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0s 0s;
}

.info-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95) perspective(600px) rotateX(-12deg); /* Adjusted initial transform for depth */
    background-color: var(--bg-nebula-tint);
    border: 1.5px solid var(--modal-border-color); /* Slightly thicker border */
    border-radius: 16px; /* Larger radius */
    box-shadow: var(--modal-complex-shadow);
    z-index: 999;
    width: 90vw;
    max-width: 850px; /* Slightly wider max-width */
    max-height: 88vh; /* Slightly taller max-height */
    padding: 35px 40px; /* Increased padding */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s 0.4s, transform 0.45s cubic-bezier(0.25, 0.8, 0.5, 1); /* Adjusted transition */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
}

.info-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1) perspective(600px) rotateX(0deg); /* Final transform */
    transition: opacity 0.4s ease, visibility 0s 0s, transform 0.45s cubic-bezier(0.25, 0.8, 0.5, 1);
}

.modal-close-btn {
    position: absolute;
    top: 20px; /* Increased distance from edge */
    right: 20px; /* Increased distance from edge */
    background: none;
    border: none;
    color: var(--text-cosmic-dust);
    font-size: 2rem; /* Larger */
    cursor: pointer;
    transition: color 0.3s ease, transform 0.4s cubic-bezier(0.25, 0.8, 0.5, 1), text-shadow 0.3s; /* Adjusted transitions */
    z-index: 10;
}
.modal-close-btn:hover, .modal-close-btn:focus-visible {
    color: var(--primary-star-glow);
    transform: rotate(180deg) scale(1.25); /* More pronounced scale */
    text-shadow: 0 0 10px var(--primary-star-glow); /* Stronger shadow */
    outline: none;
}

.modal-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 2.8rem); /* Slightly larger */
    color: var(--primary-star-glow);
    margin-bottom: 30px; /* More space */
    padding-bottom: 16px; /* More space */
    border-bottom: 1.5px solid var(--modal-border-color); /* Slightly thicker border */
    text-shadow: 0 0 10px var(--primary-star-glow), 0 0 4px var(--hdr-highlight); /* Enhanced shadow */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.modal-title i.title-icon {
    margin-right: 18px; /* More space */
    font-size: 0.9em; /* Slightly larger icon relative to text */
    color: var(--accent-star-trail);
    text-shadow: 0 0 8px var(--accent-star-trail); /* Stronger icon shadow */
}
.modal-title::before {
    content: attr(data-text);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 2px; /* Adjusted position */
    color: var(--secondary-star-glow);
    opacity: 0.12; /* Slightly more visible ghost */
    z-index: -1;
    filter: blur(2px); /* Slightly more blur */
    font-size: 1em;
    text-shadow: 0 0 6px var(--secondary-star-glow); /* Stronger ghost shadow */
}

.modal-content {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 20px; /* More space for scrollbar */
    margin-right: -20px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-star-glow) rgba(135, 206, 250, 0.1); /* Slightly more opaque track */
}
.modal-content::-webkit-scrollbar {
    width: 10px; /* Wider */
}
.modal-content::-webkit-scrollbar-track {
    background: rgba(135, 206, 250, 0.08); /* Slightly more opaque track */
    border-radius: 10px; /* Larger radius */
}
.modal-content::-webkit-scrollbar-thumb {
    background-color: var(--primary-star-glow);
    border-radius: 10px; /* Larger radius */
    border: 2px solid var(--bg-nebula-tint); /* Thicker border */
    box-shadow: 0 0 6px var(--primary-star-glow); /* Stronger shadow */
}
.modal-content::-webkit-scrollbar-thumb:hover {
    background-color: var(--hdr-highlight);
    box-shadow: 0 0 10px var(--hdr-highlight);
}

/* Specific Modal Content Styling - Professional Refinement */

/* About Modal */
.profile-intro {
    display: flex;
    gap: 35px; /* More spacing */
    margin-bottom: 35px;
    align-items: flex-start;
}
.modal-profile-photo, .modal-profile-photo-placeholder {
    width: 160px; /* Larger photo */
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--primary-star-glow); /* Thicker border */
    box-shadow: 0 0 20px var(--primary-star-glow), 0 0 6px var(--secondary-star-glow); /* Enhanced shadow */
    flex-shrink: 0;
    transition: transform 0.4s ease, box-shadow 0.4s ease; /* Adjusted transition */
}
.modal-profile-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.05); /* Slightly more visible placeholder bg */
}
.modal-profile-photo-placeholder i { font-size: 90px; } /* Larger icon */
.modal-profile-photo-placeholder p { margin-top: 12px; font-size: 0.9rem; color: var(--text-cosmic-dust);} /* Slightly larger placeholder text */

.modal-profile-photo:hover, .modal-profile-photo-placeholder:hover {
    transform: scale(1.05) rotate(3deg); /* More pronounced rotation */
    box-shadow: 0 0 30px var(--primary-star-glow), 0 0 12px var(--secondary-star-glow), 0 0 18px var(--hdr-highlight); /* Enhanced hover shadow */
}
.profile-titles {
    flex-grow: 1;
}
.profile-titles h3 {
    font-family: var(--font-display);
    font-size: 1.75rem; /* Slightly larger */
    color: var(--text-nova-bright);
    margin-bottom: 16px;
    text-shadow: 0 0 6px var(--primary-star-glow);
}
.profile-titles p {
    font-size: 1rem; /* Slightly larger */
    color: var(--text-nebula-soft);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    line-height: 1.7;
}
.profile-titles p i {
    margin-right: 14px;
    color: var(--accent-star-trail);
    width: 24px; /* Slightly wider icon area */
    text-align: center;
    font-size: 1.15em; /* Slightly larger icon relative to text */
    text-shadow: 0 0 3px var(--accent-star-trail);
    transition: transform 0.25s ease, color 0.25s ease;
}
.profile-titles p:hover i {
    color: var(--primary-star-glow);
    transform: scale(1.15); /* More pronounced hover icon effect */
}
.location-title i {
    color: var(--primary-star-glow);
    text-shadow: 0 0 6px var(--primary-star-glow);
}
.bio-text p {
    font-size: 1.05rem; /* Slightly larger */
    line-height: 1.9; /* More leading */
    color: var(--text-nebula-soft);
    text-shadow: 0 0 1.5px rgba(0,0,0,0.5); /* Slightly stronger shadow */
}
.bio-text p::first-letter {
    font-size: 1.5em; /* Slightly larger first letter */
    color: var(--primary-star-glow);
    font-weight: 500;
    padding-right: 3px;
    text-shadow: 0 0 6px var(--primary-star-glow);
}

/* Skills Modal */
.modal-skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px; /* More gap */
}
@media (min-width: 700px) { /* Adjusted breakpoint */
    .modal-skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Slightly wider min column */
    }
}
.skill-category {
    background: rgba(25, 40, 75, 0.75); /* More opaque */
    padding: 28px; /* More padding */
    border-radius: 12px; /* Softer radius */
    border: 1.5px solid var(--modal-border-color); /* Thicker border */
    box-shadow: inset 0 0 12px rgba(135,206,250,0.15), 0 0 6px rgba(0,0,0,0.4); /* Enhanced shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Adjusted transition */
}
.skill-category:hover {
    transform: translateY(-6px) scale(1.025); /* More pronounced effect */
    box-shadow: inset 0 0 16px rgba(135,206,250,0.25), 0 0 18px var(--modal-shadow-color); /* Enhanced hover shadow */
}
.skill-category h3 {
    font-size: 1.35rem; /* Larger */
    font-weight: 600;
    color: var(--primary-star-glow);
    margin-top: 0;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    text-shadow: 0 0 8px var(--primary-star-glow);
}
.skill-category h3 i {
    margin-right: 14px;
    font-size: 1.25em;
    color: var(--accent-star-trail);
    text-shadow: 0 0 6px var(--accent-star-trail);
}
.skill-category ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.skill-category ul li {
    font-size: 0.95rem; /* Slightly larger */
    margin-bottom: 10px;
    line-height: 1.8;
    color: var(--text-nebula-soft);
    padding-left: 28px; /* More space */
    position: relative;
}
.skill-category ul li::before {
    content: "▹";
    color: var(--primary-star-glow);
    position: absolute;
    left: 0;
    font-size: 1.2em; /* Slightly larger */
    top: 0.05em;
    text-shadow: 0 0 6px var(--primary-star-glow);
}

/* Tech Modal */
.additional-tech-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px; /* More gap */
    justify-content: center;
}
.additional-tech-list li {
    font-size: 0.95rem; /* Slightly larger */
    font-family: var(--font-mono);
    color: var(--text-nebula-soft);
    background-color: var(--orb-bg); /* Use orb bg color */
    padding: 10px 18px;
    border-radius: 8px; /* Larger radius */
    border: 1.5px solid var(--orb-border); /* Thicker border */
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease; /* Adjusted transition */
    box-shadow: 0 3px 6px rgba(0,0,0,0.4); /* Enhanced shadow */
}
.additional-tech-list li:hover {
    background-color: var(--primary-star-glow);
    border-color: var(--hdr-highlight);
    color: var(--bg-deep-space);
    transform: scale(1.08) translateY(-3px); /* More pronounced effect */
    box-shadow: 0 0 12px var(--primary-star-glow), 0 0 6px var(--hdr-highlight), 0 5px 10px rgba(0,0,0,0.5); /* Enhanced hover shadow */
}
.additional-tech-list li strong {
    color: var(--hdr-highlight);
    font-weight: 500;
}
.additional-tech-list li:hover strong {
    color: var(--bg-deep-space);
}


/* Connect Modal */
.connect-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px; /* More gap */
    text-align: center;
}
.contact-channels p {
    margin-bottom: 25px;
}
.contact-channels a, .social-links-modal a {
    color: var(--text-nebula-soft);
    text-decoration: none;
    font-size: 1.2rem; /* Larger */
    transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease; /* Adjusted transitions */
    display: inline-flex;
    align-items: center;
    position: relative;
}
.contact-channels a::after, .social-links-modal a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px; /* Thicker underline */
    bottom: -5px; /* Lower underline */
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-star-glow);
    transition: width 0.4s var(--transition-smooth); /* Slightly slower transition */
}

.contact-channels a:hover, .social-links-modal a:hover,
.contact-channels a:focus-visible, .social-links-modal a:focus-visible {
    color: var(--primary-star-glow);
    text-shadow: 0 0 10px var(--primary-star-glow), 0 0 6px var(--hdr-highlight); /* Enhanced shadow */
    transform: scale(1.04); /* Slightly more pronounced scale */
    outline: none;
}
.contact-channels a:hover::after, .social-links-modal a:hover::after,
.contact-channels a:focus-visible::after, .social-links-modal a:focus-visible::after {
    width: calc(100% - 8px); /* Slightly wider underline */
}

.contact-channels i, .social-links-modal i {
    margin-right: 15px; /* More space */
    font-size: 1.5em; /* Larger icons */
    color: var(--accent-star-trail);
    transition: color 0.3s ease, transform 0.3s ease, text-shadow 0.3s ease; /* Adjusted transitions */
}
.contact-channels a:hover i, .social-links-modal a:hover i,
.contact-channels a:focus-visible i, .social-links-modal a:focus-visible i {
    color: var(--primary-star-glow);
    transform: scale(1.15) rotate(-6deg); /* More pronounced effect */
    text-shadow: 0 0 8px var(--primary-star-glow); /* Enhanced shadow */
}
.social-links-modal {
    display: flex;
    gap: 35px; /* More gap */
}
.social-links-modal a {
    font-size: 2.8rem; /* Larger social icons */
}
.social-links-modal i {
    margin-right: 0;
}
.connect-cta {
    font-size: 1.05rem; /* Slightly larger */
    color: var(--text-cosmic-dust);
    margin-top: 15px; /* More space */
    font-style: normal;
}

/* Site Footer Credit */
.site-footer-credit {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 0;
    background-color: rgba(0, 2, 8, 0.6); /* Semi-transparent deep space */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--text-cosmic-dust);
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    text-align: center;
    z-index: 5; /* Above canvas, below modals if any overlay issues */
    letter-spacing: 0.05em;
    border-top: 1px solid rgba(135, 206, 250, 0.1);
}

.site-footer-credit p {
    animation: pulseFooterText 3s infinite ease-in-out alternate;
    display: inline-block; /* For transform to work correctly with text-shadow animation */
}

@keyframes pulseFooterText {
    0% {
        text-shadow: 0 0 4px var(--bg-deep-space);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 4px var(--bg-deep-space), 0 0 8px var(--accent-star-trail);
        transform: scale(1.02);
    }
    100% {
        text-shadow: 0 0 4px var(--bg-deep-space);
        transform: scale(1);
    }
}

.site-footer-credit .cosmic-heart {
    color: var(--primary-star-glow);
    text-shadow: 0 0 6px var(--primary-star-glow);
    animation: pulseHeart 2s infinite ease-in-out;
    display: inline-block; /* For transform to work correctly */
}
.site-footer-credit .cosmic-js-icon {
    color: #F7DF1E; /* JavaScript yellow */
    text-shadow: 0 0 6px #F7DF1E;
    animation: pulseJsIcon 2.5s infinite ease-in-out;
    display: inline-block;
    font-size: 1.1em;
    vertical-align: -0.05em;
    margin: 0 2px;
}

@keyframes pulseHeart {
    0%, 100% { transform: scale(1); opacity: 0.8;}
    50% { transform: scale(1.25); opacity: 1;}
}
@keyframes pulseJsIcon {
    0%, 100% { transform: scale(1) rotate(-5deg); opacity: 0.85;}
    50% { transform: scale(1.15) rotate(5deg); opacity: 1;}
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    .site-header {
        margin-bottom: 30px;
        padding: 0 15px;
    }
     .main-name { font-size: clamp(2.8rem, 9vw, 5.5rem); } /* Adjust max font size */
    .sub-title { font-size: clamp(0.95rem, 2.8vw, 1.4rem); margin-top: 10px; } /* Adjusted */

    .celestial-navigation {
        gap: clamp(15px, 3.5vw, 35px); /* Adjusted gap */
        margin-top: 25px;
        padding: 0 15px;
    }
    .celestial-orb {
        width: clamp(70px, 15vw, 95px); /* Adjusted size range */
        height: clamp(70px, 15vw, 95px);
        font-size: clamp(1.6rem, 2.8vw, 2rem); /* Adjusted font size */
    }
    .celestial-orb span {
        font-size: clamp(0.6rem, 1.4vw, 0.7rem); /* Adjusted label size */
         margin-top: 6px;
    }
    .info-modal {
        padding: 25px 30px; /* Adjusted padding */
        max-width: 95vw;
        max-height: 90vh;
    }
    .modal-title {
        font-size: clamp(1.8rem, 5.5vw, 2.4rem); /* Adjusted */
        padding-bottom: 12px;
    }
    .profile-intro {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 25px;
        margin-bottom: 25px;
    }
    .modal-profile-photo, .modal-profile-photo-placeholder {
        width: 140px;
        height: 140px;
        margin-bottom: 15px;
    }
     .modal-profile-photo-placeholder i { font-size: 70px; } /* Adjusted */
     .modal-profile-photo-placeholder p { font-size: 0.85rem; margin-top: 8px;}

    .profile-titles p {
        justify-content: center;
        font-size: 0.95rem;
         margin-bottom: 8px;
    }
    .profile-titles h3 { font-size: 1.55rem; margin-bottom: 12px;}
    .bio-text p { font-size: 1rem; line-height: 1.8;}


    .skill-category h3 { font-size: 1.25rem; margin-bottom: 18px;}
    .skill-category ul li { font-size: 0.9rem; margin-bottom: 8px; padding-left: 26px;}

    .additional-tech-list { gap: 12px;}
    .additional-tech-list li { font-size: 0.9rem; padding: 8px 14px;}

    .connect-content { gap: 30px;}
    .contact-channels p { margin-bottom: 18px;}
     .contact-channels a, .social-links-modal a { font-size: 1.1rem;}
    .social-links-modal { gap: 30px;}
    .social-links-modal a { font-size: 2.4rem;}
     .connect-cta { font-size: 1rem; margin-top: 12px;}
}

@media (max-width: 480px) {
    body {
        padding-bottom: 60px; /* More space for footer on small screens if text wraps */
    }
    .main-name {
        letter-spacing: 0.06em;
        font-size: clamp(2.5rem, 11vw, 4rem); /* Adjusted */
    }
    .sub-title {
        font-size: clamp(0.85rem, 3.8vw, 1.2rem); /* Adjusted */
        margin-top: 8px;
    }
    .celestial-orb {
        width: clamp(60px, 18vw, 85px); /* Adjusted size */
        height: clamp(60px, 18vw, 85px);
         font-size: clamp(1.4rem, 2.8vw, 1.8rem);
    }
    .celestial-orb span {
        display: none; /* Hide label on smaller screens */
    }
    .info-modal {
        padding: 20px; /* Adjusted padding */
    }
    .modal-close-btn {
        font-size: 1.8rem;
        top: 15px;
        right: 15px;
    }
     .modal-title {
         font-size: clamp(1.5rem, 6vw, 2rem);
         padding-bottom: 10px;
     }
    .profile-titles h3 { font-size: 1.45rem; margin-bottom: 10px;}
    .profile-titles p { font-size: 0.9rem; margin-bottom: 6px;}
     .bio-text p { font-size: 0.95rem; line-height: 1.7;}

    .skill-category h3 { font-size: 1.1rem; margin-bottom: 16px;}
    .skill-category ul li { font-size: 0.85rem; padding-left: 20px; margin-bottom: 7px;}
    .additional-tech-list li { font-size: 0.85rem; padding: 6px 10px;}
    .contact-channels a { font-size: 1rem; margin-bottom: 5px;}
    .social-links-modal { gap: 25px;}
    .social-links-modal a { font-size: 2.2rem; }
    .connect-cta { font-size: 0.95rem; margin-top: 10px;}

    .site-footer-credit {
        padding: 8px 0;
        font-size: clamp(0.65rem, 1.5vw, 0.8rem);
    }
    .site-footer-credit .cosmic-js-icon {
        font-size: 1em;
    }
}

*:focus-visible {
  outline: 3px solid var(--primary-star-glow); /* Thicker outline */
  outline-offset: 3px; /* Larger offset */
  border-radius: 5px; /* Larger radius */
}
.modal-close-btn:focus-visible {
    outline: 3px solid var(--primary-star-glow) !important;
    outline-offset: 2px;
     border-radius: 50%; /* Maintain circle shape */
}
.celestial-orb:focus-visible {
    outline: none; /* Custom focus visible handled by hover/focus-visible combined styles */
}