/* General Styles */
:root {
    /* Default Dark Theme */
    --primary-color: #00f0ff; /* Neon Cyan */
    --secondary-color: #00ff9d; /* Neon Mint */
    --accent-color: #ff4081; /* Vibrant Pink */
    --bg-gradient: linear-gradient(135deg, #050505 0%, #0a0f14 100%);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --text-color: #b0b7c3;
    --heading-color: #ffffff;
    --nav-bg: rgba(5, 5, 5, 0.8);
    --container-width: 1200px;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-gradient);
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.5s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-gradient);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Navigation */
nav {
    background: var(--nav-bg);
    backdrop-filter: blur(10px); /* Optimized for performance */
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.5rem 0;
    transition: background 0.3s ease, padding 0.3s ease;
}

nav.scrolled {
    padding: 0.2rem 0;
    box-shadow: 0 5px 20px var(--shadow-color);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--primary-color);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease;
}

.logo i {
    animation: pulse-red 2s infinite;
    color: var(--accent-color);
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--heading-color);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Nav Controls (Theme & Mobile) */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    color: var(--heading-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 4rem 0; /* Reduced gap */
    position: relative;
    z-index: 1;
    background: linear-gradient(rgba(5, 5, 5, 0.7), rgba(5, 5, 5, 0.7)), url('../images/bannerimage.jpg');
    background-size: cover;
    background-position: center;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4rem;
    width: 100%;
    position: relative;
    z-index: 2;
}

.hero-text {
    max-width: 900px;
    margin: 0 auto;
    opacity: 0; /* For JS Animation */
    transform: translateY(20px);
    animation: fadeInUp 1s forwards 0.5s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.greeting {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.hero-name {
    font-size: 4rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 0.2rem;
    line-height: 1.2;
    background: linear-gradient(to right, #fff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-role {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-shadow: 0 0 15px var(--accent-color);
    min-height: 3rem;
}

.cursor {
    display: inline-block;
    animation: blink 1s infinite;
    color: var(--accent-color);
    margin-left: 5px;
}

.hero-text p {
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    color: #e0e0e0; /* Fixed light color for dark overlay */
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    text-align: center;
}

/* CTA Button */
.btn-primary {
    display: inline-block;
    padding: 12px 35px;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    width: 100%;
}

.btn-primary:hover {
    color: #000;
    box-shadow: 0 0 20px var(--primary-color);
}

/* ECG Animation */
.ecg-line-container {
    position: absolute;
    top: 12%;
    left: 0;
    width: 100%;
    height: 50px;
    overflow: hidden;
    z-index: 0;
    opacity: 0.5;
}

.ecg-svg {
    width: 100%;
    height: 100%;
}

.ecg-path {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 2;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw-line 4s linear infinite;
}

.ecg-peak {
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 2;
    opacity: 0;
    animation: pulse-peak 4s linear infinite;
}

.ecg-dot {
    fill: #fff;
    offset-path: path("M0,50 H150 L170,50 L180,40 L190,50 L200,50 L205,60 L210,10 L215,90 L220,50 L230,50 L240,40 L250,50 H800");
    animation: move-dot 4s linear infinite, pulse-red-dot 4s linear infinite;
}

.hero:hover .ecg-path,
.hero:hover .ecg-peak,
.hero:hover .ecg-dot {
    animation-duration: 2s; /* Speed up on hover */
}

@keyframes draw-line {
    0% { stroke-dashoffset: 1000; }
    100% { stroke-dashoffset: 0; }
}

@keyframes move-dot {
    0% { offset-distance: 0%; }
    100% { offset-distance: 100%; }
}

@keyframes pulse-peak {
    0%, 24% { opacity: 0; }
    25%, 30% { opacity: 1; filter: drop-shadow(0 0 8px var(--accent-color)); }
    31%, 100% { opacity: 0; }
}

@keyframes pulse-red-dot {
    0%, 24% { fill: #fff; r: 4; }
    25%, 30% { fill: var(--accent-color); r: 6; filter: drop-shadow(0 0 10px var(--accent-color)); }
    31%, 100% { fill: #fff; r: 4; }
}

/* Sections */
.section-light {
    padding: 5rem 0; /* Reduced gap */
}

.section-dark {
    padding: 5rem 0; /* Reduced gap */
    background: var(--glass-bg);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--heading-color);
    margin-bottom: 3rem; /* Reduced gap */
    font-weight: 700;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Timeline (Experience) */
.timeline-item {
    border-left: 2px solid var(--primary-color);
    padding-left: 30px;
    margin-bottom: 40px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-color);
}

.timeline-item h3 {
    color: var(--heading-color);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.timeline-item .date {
    font-size: 0.95rem;
    color: var(--secondary-color);
    font-weight: 500;
    display: block;
    margin-bottom: 15px;
}

.timeline-item p {
    color: var(--text-color);
    font-size: 1rem;
    text-align: justify;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

.skill-card {
    background: var(--glass-bg);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.skill-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px var(--shadow-color);
}

.service-card ul {
    text-align: left;
    padding-left: 20px;
    margin-top: 15px;
    list-style: disc inside;
    color: var(--text-color);
    text-align: left;
}

/* Education Layout */
.education-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.col-title {
    font-size: 1.8rem;
    color: var(--heading-color);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.col-title i {
    color: var(--primary-color);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.cert-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.cert-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
}

.cert-card i {
    font-size: 2rem;
    color: var(--secondary-color);
}

.cert-card span {
    font-weight: 500;
    color: var(--heading-color);
}

/* Philosophy Section */
.philosophy-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.philosophy-text p {
    font-size: 1.1rem;
    color: var(--text-color);
    text-align: justify;
    background: var(--glass-bg);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.values-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.value-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.value-card:hover {
    background: rgba(0, 240, 255, 0.1);
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.value-card i {
    font-size: 2rem;
    color: var(--secondary-color);
}

.value-card span {
    font-weight: 600;
    color: var(--heading-color);
}

/* Contact */
.contact-wrapper {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.contact-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    max-width: 700px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border-color: var(--primary-color);
}

.contact-card h3 {
    font-size: 2rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

.contact-card p {
    color: var(--text-color);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 240, 255, 0.05);
    padding: 12px 30px;
    border-radius: 50px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 3rem;
    border: 1px solid rgba(0, 240, 255, 0.2);
    transition: all 0.3s ease;
}

.location-badge:hover {
    background: rgba(0, 240, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.social-connect {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.social-btn {
    width: 100px;
    height: 100px;
    border-radius: 20px; /* Rounded Square */
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Tooltip Styles */
.social-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--primary-color);
    color: #000;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
}

.social-btn:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.social-btn:hover {
    color: #fff;
    transform: translateY(-5px) scale(1.1);
    border-color: transparent;
}

.social-btn.facebook:hover {
    background: #1877f2;
    box-shadow: 0 0 20px rgba(24, 119, 242, 0.6);
}

.social-btn.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    box-shadow: 0 0 20px rgba(220, 39, 67, 0.6);
}

.social-btn.linkedin:hover {
    background: #0077b5;
    box-shadow: 0 0 20px rgba(0, 119, 181, 0.6);
}

/* Footer */
footer {
    background: #050505;
    color: var(--text-color);
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
    border-top: 1px solid var(--glass-border);
    font-size: 0.9rem;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: #000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 0 15px var(--primary-color);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: translateY(-5px);
    background: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    
    .nav-links {
        position: absolute;
        right: 0;
        top: 60px;
        background: var(--nav-bg);
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding: 2rem 0;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .hamburger {
        display: block;
    }

    .education-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .philosophy-layout {
        grid-template-columns: 1fr;
    }
    
    .hero-name {
        font-size: 2.5rem;
    }

    .about-content {
        flex-direction: column;
    }

    .about-image, .about-text {
        width: 100%;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 1.5rem;
    }
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.floating-cross, .floating-icon {
    position: absolute;
    color: var(--primary-color);
    opacity: 0.03;
    font-size: 3rem;
    animation: float 10s ease-in-out infinite;
    will-change: transform; /* Performance optimization */
}

.cross-1 { top: 15%; left: 10%; animation-delay: 0s; }
.cross-2 { top: 75%; left: 85%; animation-delay: 2s; }
.cross-3 { top: 35%; left: 60%; animation-delay: 4s; font-size: 5rem; }
.cross-4 { top: 85%; left: 15%; animation-delay: 1s; }

.icon-syringe { top: 20%; right: 20%; font-size: 4rem; animation-delay: 3s; transform: rotate(45deg); }
.icon-steth { bottom: 20%; left: 30%; font-size: 6rem; animation-delay: 5s; opacity: 0.03; }
.icon-pulse { top: 50%; left: 50%; font-size: 10rem; opacity: 0.02; transform: translate(-50%, -50%); }

.social-links {
    margin-top: 2rem;
    display: flex;
    gap: 25px;
    justify-content: center;
}

.social-links a {
    font-size: 3rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    animation: pulse-glow 2s infinite;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-5px) scale(1.1);
    text-shadow: 0 0 15px var(--primary-color);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes pulse-red {
    0% { transform: scale(1); text-shadow: 0 0 0 rgba(255, 64, 129, 0.7); }
    50% { transform: scale(1.2); text-shadow: 0 0 10px rgba(255, 64, 129, 1); }
    100% { transform: scale(1); text-shadow: 0 0 0 rgba(255, 64, 129, 0.7); }
}

@keyframes pulse-glow {
    0% { text-shadow: 0 0 5px rgba(0, 240, 255, 0.2); }
    50% { text-shadow: 0 0 20px rgba(0, 240, 255, 0.6); }
    100% { text-shadow: 0 0 5px rgba(0, 240, 255, 0.2); }
}

/* About Section Layout */
.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.about-image img {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
}

.about-text {
    flex: 1;
}

.about-text p {
    text-align: justify;
    margin-bottom: 1.5rem;
}

/* Particle Animation */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
}

.particles li {
    position: absolute;
    display: block;
    list-style: none;
    width: 20px;
    height: 20px;
    background: rgba(0, 240, 255, 0.1);
    animation: animate-particles 25s linear infinite;
    bottom: -150px;
    will-change: transform;
}

.particles li:nth-child(1) { left: 25%; width: 80px; height: 80px; animation-delay: 0s; }
.particles li:nth-child(2) { left: 10%; width: 20px; height: 20px; animation-delay: 2s; animation-duration: 12s; }
.particles li:nth-child(3) { left: 70%; width: 20px; height: 20px; animation-delay: 4s; }
.particles li:nth-child(4) { left: 40%; width: 60px; height: 60px; animation-delay: 0s; animation-duration: 18s; }
.particles li:nth-child(5) { left: 65%; width: 20px; height: 20px; animation-delay: 0s; }
.particles li:nth-child(6) { left: 75%; width: 110px; height: 110px; animation-delay: 3s; background: rgba(0, 255, 157, 0.1); }
.particles li:nth-child(7) { left: 35%; width: 150px; height: 150px; animation-delay: 7s; }
.particles li:nth-child(8) { left: 50%; width: 25px; height: 25px; animation-delay: 15s; animation-duration: 45s; }
.particles li:nth-child(9) { left: 20%; width: 15px; height: 15px; animation-delay: 2s; animation-duration: 35s; }
.particles li:nth-child(10) { left: 85%; width: 150px; height: 150px; animation-delay: 0s; animation-duration: 11s; background: rgba(0, 255, 157, 0.05); }

@keyframes animate-particles {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 0;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }
}