/* CSS Variables */
:root {
    --bg-main: #0a0e17;
    --bg-secondary: #111823;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-primary: #00f2fe;
    --accent-secondary: #4facfe;
    --glass-bg: rgba(17, 24, 35, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Light Mode Variables */
:root.light-mode {
    --bg-main: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
}

/* Reset & Initial Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Utilities */
.accent {
    color: var(--accent-primary);
}

.section {
    padding: 100px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    margin-bottom: 50px;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
}

.underline {
    height: 4px;
    width: 60px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    margin-top: 10px;
    border-radius: 2px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 242, 254, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    color: #000;
    border: none;
}

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
    transform: scale(1.05);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent-primary);
}

.btn-outline:hover {
    background: rgba(0, 242, 254, 0.1);
    transform: scale(1.05);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
}

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

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.theme-toggle {
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: color 0.3s ease, transform 0.3s ease;
}

.theme-toggle:hover {
    color: var(--accent-primary);
    transform: rotate(15deg);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 80px 5% 0; /* Add top padding to account for fixed header */
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.hero-content {
    flex: 1;
    z-index: 2;
}

.greeting {
    color: var(--accent-primary);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.name {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dynamic-text {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 20px;
    height: 40px;
}

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

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

.description {
    color: var(--text-secondary);
    max-width: 600px;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icons a {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.social-icons a:hover {
    color: var(--accent-primary);
    transform: translateY(-3px);
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.abstract-shape {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(0, 242, 254, 0.4), rgba(79, 172, 254, 0.1));
    box-shadow: inset 0 0 50px rgba(0, 242, 254, 0.2), 0 0 100px rgba(0, 242, 254, 0.1);
    position: relative;
    animation: float 6s ease-in-out infinite;
    display: flex;
    justify-content: center;
    align-items: center;
}

.abstract-shape::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent);
    backdrop-filter: blur(10px);
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

.profile-img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.5);
    z-index: 10;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 242, 254, 0.8);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.subsection-title {
    margin: 40px 0 20px;
    font-size: 1.5rem;
}

.timeline {
    border-left: 2px solid var(--glass-border);
    padding-left: 30px;
    margin-left: 10px;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-dot {
    position: absolute;
    left: -37px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--accent-primary);
    margin-bottom: 5px;
    font-weight: 500;
}

.timeline-content h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.timeline-content p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
}

.stat {
    text-align: center;
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 10px;
}

.stat h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.stat p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

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

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(0, 242, 254, 0.1);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Experience */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.experience-card .exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.exp-header h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
}

.exp-header .company {
    color: var(--accent-secondary);
    font-size: 1.1rem;
    margin-top: 5px;
}

.exp-header .date {
    background: rgba(255,255,255,0.05);
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.exp-details {
    padding-left: 20px;
    color: var(--text-secondary);
}

.exp-details li {
    margin-bottom: 10px;
}

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

.project-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-image {
    height: 200px;
    width: 100%;
}

.project-content {
    padding: 30px;
}

.project-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Contact */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    padding: 50px;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-methods .method {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-secondary);
}

.method i {
    font-size: 1.2rem;
    color: var(--accent-primary);
    width: 24px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255,255,255,0.05);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ambient Background Animation */
.ambient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.6;
    animation: floatBlob infinite alternate ease-in-out;
}

.blob-1 {
    width: 40vw;
    height: 40vw;
    background: rgba(0, 242, 254, 0.25);
    top: -10%;
    left: -10%;
    animation-duration: 25s;
}

.blob-2 {
    width: 35vw;
    height: 35vw;
    background: rgba(79, 172, 254, 0.2);
    bottom: -15%;
    right: -10%;
    animation-duration: 30s;
    animation-direction: alternate-reverse;
}

.blob-3 {
    width: 30vw;
    height: 30vw;
    background: rgba(0, 242, 254, 0.15);
    top: 40%;
    left: 40%;
    animation-duration: 35s;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(5vw, 5vh) scale(1.1); }
    66% { transform: translate(-5vw, 8vh) scale(0.9); }
    100% { transform: translate(-8vw, -5vh) scale(1.05); }
}

/* Media Queries */
@media (max-width: 968px) {
    .hero {
        flex-direction: column-reverse;
        justify-content: center;
        text-align: center;
        padding-top: 120px;
        padding-bottom: 40px;
    }
    .cta-buttons, .social-icons {
        justify-content: center;
    }
    .hero-image-container {
        display: flex;
        margin-bottom: 20px;
    }
    .abstract-shape {
        width: 300px;
        height: 300px;
    }
    .profile-img {
        width: 240px;
        height: 240px;
    }
    .about-content, .contact-container {
        grid-template-columns: 1fr;
    }
    .name {
        font-size: 3.5rem;
    }
    .exp-header {
        flex-direction: column;
    }
    .exp-header .date {
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 80px;
        left: -100%;
        flex-direction: column;
        background: var(--bg-secondary);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        padding: 30px 0;
        gap: 25px;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-links.active {
        left: 0;
    }

    .hamburger {
        display: block;
    }
    .name {
        font-size: 2.8rem;
    }
    .dynamic-text {
        font-size: 1.5rem;
    }

    /* Start Center Alignment for Mobile Screen */
    .section-title {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .about-text, .subsection-title {
        text-align: center;
    }
    
    .about-text .btn {
        margin: 10px auto 2rem auto !important;
        display: block;
        width: fit-content;
    }

    .timeline {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
    }
    
    .timeline-item {
        text-align: center;
    }
    
    .timeline-dot {
        position: relative;
        left: 0;
        top: 0;
        margin: 0 auto 10px auto;
    }

    .experience-card, .exp-header {
        text-align: center;
        align-items: center;
    }
    
    .exp-details {
        padding-left: 0;
        list-style: none;
    }

    .skill-category, .project-content {
        text-align: center;
    }

    .tags {
        justify-content: center;
    }
    /* End Center Alignment for Mobile */
}

@media (max-width: 480px) {
    .abstract-shape {
        width: 250px;
        height: 250px;
    }
    .profile-img {
        width: 200px;
        height: 200px;
    }
    .hero {
        padding-top: 100px;
    }
}

/* Custom Cursor */
@media (min-width: 969px) {
    body {
        cursor: none;
    }
    a, button, input, textarea, .theme-toggle, .hamburger {
        cursor: none !important;
    }
    .cursor-dot {
        width: 8px;
        height: 8px;
        background-color: var(--accent-primary);
        position: fixed;
        top: 0;
        left: 0;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        z-index: 9999;
        pointer-events: none;
    }
    .cursor-outline {
        width: 40px;
        height: 40px;
        border: 2px solid var(--accent-secondary);
        position: fixed;
        top: 0;
        left: 0;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        z-index: 9998;
        pointer-events: none;
        transition: transform 0.2s ease, background-color 0.2s ease;
    }
}
@media (max-width: 968px) {
    .cursor-dot, .cursor-outline {
        display: none;
    }
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-main);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

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

.loader .logo-text {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    animation: pulseText 1.5s infinite;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 242, 254, 0.2);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* Scroll Progress Indicator */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #000;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.4);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: -100px;
    right: 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: bottom 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    bottom: 30px;
}

.toast i {
    color: var(--accent-primary);
    font-size: 1.5rem;
}

/* Voice Navigation UI */
.voice-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 2px solid var(--accent-secondary);
    color: var(--accent-primary);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
    transition: all 0.3s ease;
}

.voice-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 242, 254, 0.1);
}

.voice-btn.listening {
    background: var(--accent-primary);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.6);
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    opacity: 0;
    pointer-events: none;
}

.voice-btn.listening .pulse-ring {
    animation: pulseMic 1.5s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes pulseMic {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}

.speech-toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 12px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: bottom 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.speech-toast.show {
    bottom: 30px;
}

.speech-toast i {
    color: var(--accent-primary);
    font-size: 1.2rem;
    animation: wave 1.5s infinite;
}

@keyframes wave {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.5); }
}

.speech-toast #speech-text {
    font-weight: 500;
    color: var(--text-primary);
}
