/* --- Variables --- */
:root {
    --bg-color: #050505;
    --card-bg: rgba(20, 20, 20, 0.4);
    --primary: #00f2ff;
    --secondary: #7000ff;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --glass-border: rgba(255, 255, 255, 0.1);
    --neon-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none !important; /* Hide system cursor globally for custom aesthetic cursor */
}


html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Loader Enhancements --- */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.premium-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.neural-core {
    position: relative;
    width: 140px;
    height: 140px;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.orbit {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    transform-style: preserve-3d;
}

.orbit-1 {
    border-top: 3px solid rgba(0, 242, 255, 0.8);
    border-left: 3px solid rgba(0, 242, 255, 0.3);
    animation: rotateOrbit1 2s linear infinite;
    box-shadow: inset 0 0 20px rgba(0, 242, 255, 0.2);
}

.orbit-2 {
    border-bottom: 3px solid rgba(112, 0, 255, 0.8);
    border-right: 3px solid rgba(112, 0, 255, 0.3);
    animation: rotateOrbit2 3s linear infinite;
    box-shadow: inset 0 0 20px rgba(112, 0, 255, 0.2);
}

.orbit-3 {
    border-top: 3px solid rgba(255, 0, 200, 0.8);
    border-bottom: 3px solid rgba(255, 0, 200, 0.3);
    animation: rotateOrbit3 2.5s linear infinite;
    box-shadow: inset 0 0 20px rgba(255, 0, 200, 0.2);
}

.core-pulse {
    position: absolute;
    top: 50%; left: 50%;
    width: 40px; height: 40px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, #00f2ff, #7000ff);
    border-radius: 50%;
    box-shadow: 0 0 40px #00f2ff, 0 0 80px #7000ff;
    animation: corePulse 1.5s ease-in-out infinite alternate;
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-align: center;
    text-transform: uppercase;
    background: linear-gradient(90deg, #00f2ff, #7000ff, #00f2ff);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulseText 2s ease-in-out infinite, loadGradientShift 2s linear infinite;
    white-space: nowrap;
}

.loading-bar-container {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00f2ff, #7000ff, #00f2ff);
    background-size: 200% 100%;
    animation: loadBar 4s cubic-bezier(0.4, 0, 0.2, 1) forwards, loadGradientShift 2s linear infinite;
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.8);
}

@keyframes rotateOrbit1 {
    0% { transform: rotateX(70deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(70deg) rotateY(360deg) rotateZ(360deg); }
}

@keyframes rotateOrbit2 {
    0% { transform: rotateX(0deg) rotateY(70deg) rotateZ(0deg); }
    100% { transform: rotateX(360deg) rotateY(70deg) rotateZ(360deg); }
}

@keyframes rotateOrbit3 {
    0% { transform: rotateX(45deg) rotateY(45deg) rotateZ(0deg); }
    100% { transform: rotateX(45deg) rotateY(45deg) rotateZ(360deg); }
}

@keyframes corePulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

@keyframes loadBar {
    0% { width: 0%; }
    20% { width: 35%; }
    60% { width: 65%; }
    100% { width: 100%; }
}

@keyframes loadGradientShift {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

@keyframes pulseText {
    0%, 100% { opacity: 0.4; filter: blur(1px); }
    50% { opacity: 1; filter: blur(0px); text-shadow: 0 0 20px rgba(0, 242, 255, 0.5); }
}

/* --- Background Effects --- */
.bg-glow {
    position: fixed;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}

.bg-glow-1 {
    top: -10%;
    right: -10%;
    background: radial-gradient(circle, var(--primary), transparent);
}

.bg-glow-2 {
    bottom: -10%;
    left: -10%;
    background: radial-gradient(circle, var(--secondary), transparent);
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    pointer-events: none;
}

/* --- Cosmic Cursor --- */
#cursor-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

/* --- Top Fade Mask --- */
.top-fade-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 180px;
    background: linear-gradient(to bottom, var(--bg-color) 10%, transparent);
    z-index: 990; /* Right below the navbar */
    pointer-events: none;
}

/* --- Glassmorphism Card --- */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    padding: 15px 30px;
    z-index: 1000;
    display: flex;
    justify-content: center;
    transition: var(--transition-smooth);
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo span {
    color: var(--primary);
    text-shadow: var(--neon-shadow);
    font-weight: 300;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.nav-links a:hover {
    color: var(--primary);
    text-shadow: var(--neon-shadow);
}

.menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-btn span {
    width: 28px;
    height: 3px;
    background: #ffffff;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

/* --- Hero Section --- */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.hero-visuals {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hologram-ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top: 3px solid var(--primary);
    border-bottom: 3px solid var(--secondary);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2), inset 0 0 30px rgba(112, 0, 255, 0.2);
    animation: spin3D 10s linear infinite;
    transform-style: preserve-3d;
}

.ring-1 {
    width: 400px;
    height: 400px;
    animation-duration: 15s;
    border-top-color: #00f2ff;
}
.ring-2 {
    width: 550px;
    height: 550px;
    animation-duration: 20s;
    animation-direction: reverse;
    border-bottom-color: #ff00c8;
}
.ring-3 {
    width: 700px;
    height: 700px;
    animation-duration: 25s;
    border-top-color: #7000ff;
    opacity: 0.5;
}

@keyframes spin3D {
    0% { transform: rotateX(60deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(60deg) rotateY(360deg) rotateZ(360deg); }
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid var(--primary);
    border-radius: 30px;
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-content {
    max-width: 900px;
    padding-bottom: 40px; /* Create substantial gap before scroll indicator */
}

.hero-content h1 {
    font-size: clamp(3.5rem, 10vw, 7rem);
    margin-bottom: 0.5rem;
    line-height: 1;
    background: linear-gradient(270deg, #00f2ff, #7000ff, #ff00c8, #00f2ff);
    background-size: 800% 800%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 10s ease infinite, nameFloat 4s ease-in-out infinite;
    text-shadow: 0 0 40px rgba(0, 242, 255, 0.4);
}

@keyframes gradientShift { 
    0% { background-position: 0% 50% } 
    50% { background-position: 100% 50% } 
    100% { background-position: 0% 50% } 
}

@keyframes nameFloat { 
    0%, 100% { transform: translateY(0) } 
    50% { transform: translateY(-8px) } 
}

.hero-content h1 span {
    color: var(--primary); /* Retained for fallback but overwritten by gradient */
    text-shadow: 0 0 40px rgba(0, 242, 255, 0.6);
}

.hero-content h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 45px;
    color: var(--text-secondary);
}

/* --- About Enhancements --- */
.about-text-container {
    margin-bottom: 30px;
}

.hidden-content {
    display: none;
    margin-top: 15px;
}

.hidden-content.show {
    display: block;
    animation: fadeIn 0.5s ease forwards;
}

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

.read-more-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin-top: 10px;
}

.resume-wrapper {
    margin-top: 20px;
}

.resume-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
}

.edu-date {
    display: block;
    font-size: 0.8rem;
    color: var(--primary);
    margin-top: 5px;
    font-weight: 600;
}

/* --- Project Card Enhancements --- */
.repo-link-top {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 1.2rem;
    z-index: 10;
    transition: var(--transition-smooth);
}

.repo-link-top:hover {
    background: var(--primary);
    color: #000;
    transform: scale(1.1) rotate(10deg);
    box-shadow: var(--neon-shadow);
}

/* --- Chatbot Scrollbar --- */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
    box-shadow: 0 0 10px var(--primary);
}

/* --- Reveal Overrides --- */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: all 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.cursor {
    animation: blink 1s infinite;
    color: var(--primary);
}

@keyframes blink {
    50% { opacity: 0; }
}

/* --- Buttons --- */
.btn {
    padding: 14px 34px;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 1px;
    display: inline-block;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: #000;
    box-shadow: 0 10px 20px rgba(0, 242, 255, 0.2);
    border: none;
}

.btn-primary:before {
    content: '';
    position: absolute;
    top: -3px; left: -3px; right: -3px; bottom: -3px;
    background: linear-gradient(45deg, #00f2ff, #7000ff, #ff00c8, #00f2ff);
    z-index: -1;
    border-radius: inherit;
    filter: blur(12px);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    transform: translateY(-3px);
}

.btn-primary:hover:before {
    opacity: 1;
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    margin-left: 40px; /* Increased from 20px for more spacing */
}

.btn-outline:hover {
    background: var(--primary);
    color: #000;
    box-shadow: var(--neon-shadow);
    transform: translateY(-3px);
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 20px; /* Moved slightly further down */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    letter-spacing: 2px;
}

.mouse {
    width: 25px;
    height: 45px;
    border: 2px solid var(--text-secondary);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 2s infinite;
}

@keyframes scroll-wheel {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(15px); }
}

/* --- About Grid --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.about-card {
    padding: 40px;
    transition: var(--transition-smooth);
}

.about-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateY(-10px);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.edu-item {
    margin-top: 25px;
    padding-left: 20px;
    border-left: 2px solid var(--primary);
    position: relative;
}

.edu-dot {
    position: absolute;
    left: -7px;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: var(--neon-shadow);
}

/* --- Projects --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    overflow: hidden;
    position: relative;
    transform-style: preserve-3d;
}

.project-img {
    height: 250px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-img img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
    color: var(--primary);
}

.tags {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.tags span {
    font-size: 0.8rem;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    color: var(--primary);
}

.btn-sm {
    padding: 10px 20px;
    background: var(--primary);
    color: #000;
    border-radius: 5px;
    font-weight: bold;
}

/* --- GitHub Repos --- */
.github-repos-wrapper {
    margin-top: 80px;
    text-align: center;
}

.github-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.repo-card {
    padding: 25px;
    text-align: left;
    transition: var(--transition-smooth);
}

.repo-card h3 {
    color: var(--primary);
    margin-bottom: 10px;
    text-transform: capitalize;
}

.repo-card:hover {
    border-color: var(--secondary);
    transform: translateY(-5px);
}

.repo-lang {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.repo-stats {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    font-size: 0.9rem;
}

/* --- Skills --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-category {
    padding: 30px;
}

.skill-category h3 {
    margin-bottom: 25px;
    font-size: 1.3rem;
    color: var(--primary);
}

.skill-item {
    margin-bottom: 20px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0;
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(1, 0, 0, 1);
}

/* --- Contact & Footer --- */
.contact-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.contact-info {
    padding: 40px;
    text-align: center;
    width: 100%;
    max-width: 600px;
}

.contact-links {
    margin-top: 20px;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
}

.social-links-row {
    display: flex;
    gap: 25px;
}

.social-icon {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
}

.social-icon:hover {
    background: var(--primary);
    color: #000;
    box-shadow: var(--neon-shadow);
    transform: translateY(-5px);
}

footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

footer i {
    color: #ff0055;
}

/* --- Chatbot --- */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    height: 450px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition-smooth);
    transform-origin: bottom right;
}

.chat-window.hidden {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

.chat-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chat-close {
    background: #000; /* Solid Black background as requested */
    border: none;
    color: var(--primary); /* Cyan X icon for contrast, or I can make it black text on white bg? */
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 0.8rem;
}

.chat-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.chat-header h3 span { color: var(--primary); }

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 85%;
    font-size: 0.9rem;
}

.message.bot {
    background: rgba(255, 255, 255, 0.05);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.message.user {
    background: var(--secondary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-suggestions {
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid var(--glass-border);
}

.suggest-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: 0.2s;
}

.suggest-btn:hover {
    background: var(--primary);
    color: #000;
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Tech Arsenal 3D Orbs --- */
.tech-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.tools-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

.tool-orb {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, rgba(42, 42, 53, 0.8), rgba(16, 16, 20, 0.9));
    border-radius: 50%;
    box-shadow: inset -5px -5px 15px rgba(0, 0, 0, 0.8),
                inset 5px 5px 15px rgba(255, 255, 255, 0.1),
                0 10px 20px rgba(0, 242, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: floatOrb 4s ease-in-out infinite;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tool-orb:nth-child(even) { animation-delay: 1.5s; }
.tool-orb:nth-child(3n) { animation-delay: 0.7s; }

.tool-orb:hover {
    transform: translateY(-15px) scale(1.15) !important;
    box-shadow: inset -5px -5px 15px rgba(0, 0, 0, 0.8),
                inset 5px 5px 15px rgba(0, 242, 255, 0.3),
                0 15px 30px rgba(0, 242, 255, 0.4);
    z-index: 10;
    animation-play-state: paused;
}

.tool-orb img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
    transition: all 0.3s ease;
}

.tool-orb:hover img {
    transform: scale(1.1);
}

.tool-tooltip {
    position: absolute;
    bottom: -35px;
    background: var(--bg-card);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    border: 1px solid rgba(0, 242, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.tool-orb:hover .tool-tooltip {
    opacity: 1;
    transform: translateY(0);
}

@keyframes floatOrb {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Mobile menu logic in JS */
        gap: 15px;
        border-radius: 10px;
    }
    
    .menu-btn { display: flex; }
    
    /* Loader Fixes */
    .loading-bar-container { width: 80vw; max-width: 250px; }
    .neural-core { transform: scale(0.8); margin-bottom: -10px; }
    .loading-text { font-size: 1rem; white-space: normal; padding: 0 10px; }

    /* Hero Section Fixes */
    .hero-section { padding-top: 100px; height: auto; min-height: 100vh; padding-bottom: 120px; }
    .hero-content h1 { font-size: clamp(2.5rem, 10vw, 3.5rem); margin-top: 20px; }
    .hero-content h3 { font-size: 1.2rem; margin-bottom: 1rem; }
    .hero-content p { font-size: 1rem; margin-bottom: 30px; padding: 0 10px; }
    
    .scroll-indicator { 
        display: flex; 
        transform: translateX(-50%) scale(0.85); 
        bottom: 25px;
    }
    
    .top-fade-mask { height: 80px; } /* Prevent mask from blocking top interactions */
    
    /* Reveal Animation Adjustments for Mobile */
    .reveal { transform: translateY(20px) scale(1); } /* Less translation distance on mobile for smoother fadeins */
    
    .cta-btns {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    .btn { padding: 12px 28px; width: 100%; max-width: 250px; text-align: center; }
    .btn-outline { margin-left: 0; }
    
    .ring-1 { width: 250px; height: 250px; }
    .ring-2 { width: 350px; height: 350px; }
    .ring-3 { width: 450px; height: 450px; }
    
    /* Section Padding & Typography */
    .section-title { font-size: 2rem; margin-bottom: 2rem; }
    .section { padding: 60px 0; }
    
    /* About Fixes */
    .about-grid { grid-template-columns: 1fr; gap: 20px; }
    .about-card { padding: 25px; }
    
    /* Project Fixes */
    .projects-grid { grid-template-columns: 1fr; gap: 25px; }
    .project-img { height: 220px; }
    .project-overlay { 
        opacity: 1; 
        background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
        align-items: flex-end;
        padding-bottom: 20px;
    }
    
    /* Skills Fixes */
    .skills-grid { grid-template-columns: 1fr; gap: 20px; }
    .skill-category { padding: 25px; }
    
    /* Chatbot Fixes */
    .chatbot-container { bottom: 20px; right: 20px; }
    .chatbot-toggle { width: 50px; height: 50px; font-size: 1.5rem; }
    .chat-window {
        width: calc(100vw - 40px);
        max-width: 320px;
        height: 400px;
        right: 0;
        bottom: 70px;
    }
    
    /* Tech Tools */
    .tools-grid { gap: 15px; }
    .tool-orb { width: 60px; height: 60px; }
    .tool-orb img { width: 30px; height: 30px; }
    
    /* Contact Fixes */
    .contact-wrapper { gap: 30px; }
    .contact-info { padding: 25px; }
    .contact-link { font-size: 1rem; word-break: break-word; }
    .contact-link span { font-size: 0.95rem; }
    .social-links-row { gap: 15px; }
    .social-icon { width: 45px; height: 45px; font-size: 1.2rem; }
    
    /* Cosmic Effect Fix */
    #cursor-canvas, #hero-canvas { display: none !important; }
}

/* --- Desktop Restoration --- */
/* Reset any inline styles added by the mobile JS menu toggle when viewing on a laptop/desktop */
@media (min-width: 769px) {
    .nav-links {
        display: flex !important;
        flex-direction: row !important;
        position: static !important;
        background: transparent !important;
        padding: 0 !important;
        width: auto !important;
    }
}
