/* Variables for Light and Dark Themes */
:root {
    --navbar-bg: rgba(255, 255, 255, 0.9);
    --navbar-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --text-color: #333;
    --secondary-text-color: rgba(51, 51, 51, 0.75);
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --primary-color: #6a11cb;
    --accent-color: #ff5722;
    --background-gradient: linear-gradient(135deg, #e0eafc, #cfdef3);
    --dark-gradient: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    --font-family: 'Poppins', sans-serif;
}

/* Responsive Typography */
body {
    font-family: var(--font-family);
    background: var(--background-gradient);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    transition: background 0.4s ease, color 0.4s ease;
    line-height: 1.6;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: 1.2px;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--navbar-bg);
    box-shadow: var(--navbar-shadow);
    z-index: 1000;
    transition: background-color 0.3s ease-in-out;
    backdrop-filter: blur(8px);
}

.navbar .brand-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.navbar .brand-title:hover {
    color: var(--primary-color);
}

/* Navbar Links */
.navbar-links ul {
    list-style: none;
    display: flex;
    transition: opacity 0.5s ease;
}

.navbar-links ul li {
    margin: 0 15px;
}

.navbar-links a {
    color: var(--text-color);
    font-weight: 600;
    padding: 8px 16px;
    text-decoration: none;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 20px;
    position: relative;
}

.navbar-links a:hover {
    color: white;
    background-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

/* Toggle Button */
.toggle-button {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
}

.toggle-button .bar {
    height: 3px;
    width: 100%;
    background-color: var(--text-color);
    border-radius: 50px;
    transition: all 0.3s ease;
}

/* Card Component */
.card {
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
    padding: 30px;
    margin: 30px auto;
    max-width: 900px;
    border-radius: 12px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.card h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    letter-spacing: 1.2px;
}

/* Home Section */
.home-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px;
    flex-wrap: wrap;
}

.home-text {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
}



.typewriter-text {
    font-size: 2vw; /* Responsive font size */
    color: var(--accent-color);
    border-right: 3px solid var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}


/* Responsive Font Size for Smaller Screens */
@media (max-width: 768px) {
    .typewriter-text {
        font-size: 4vw;
        animation: typing 2.5s steps(30, end), blink-caret 0.75s step-end infinite;
    }
}


@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from,
    to {
        border-color: transparent;
    }
    50% {
        border-color: var(--text-color);
    }
}

.profile-pic {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid var(--primary-color);
}

.profile-pic img {
    width: 100%;
}

/* Dark Mode */
body.dark {
    background: var(--dark-gradient);
    color: white;
}

body.dark .navbar {
    background-color: rgba(0, 0, 0, 0.8);
}

body.dark .card {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Responsive Paragraph */
p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 15px 0;
}
.typewriter-text {
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 15px 0;
}
/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    line-height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    z-index: 1000;
}

.back-to-top:hover {
    background-color: var(--accent-color);
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 20px;
}

.theme-toggle label {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 25px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    cursor: pointer;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--primary-color);
    border-radius: 50px;
    transition: background-color 0.4s ease;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.4s ease;
}

input:checked + .toggle-slider {
    background-color: var(--accent-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Media Queries */
@media (max-width: 768px) {
    .navbar-links ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--navbar-bg);
        position: absolute;
        top: 60px;
        left: 0;
    }

    .navbar-links.active ul {
        display: flex;
    }

    .toggle-button {
        display: flex;
    }

    .profile-pic {
        width: 150px;
        height: 150px;
        border-width: 3px;
    }
    .typewriter-text {
        font-size: 1rem;
    }

    p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .profile-pic {
        width: 120px;
        height: 120px;
        border-width: 2px;
    }

    .typewriter-text {
        font-size: 0.9rem;
    }

    p {
        font-size: 0.9rem;
    }
}
/* Contact Section Styles */
.contact-section {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    padding: 50px;
    text-align: center;
    border-radius: 15px;
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 1.2s ease-in-out;
}

.contact-section:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.contact-section h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
    color: #ffffff;
    letter-spacing: 1.5px;
    position: relative;
    animation: popIn 0.6s ease-in-out;
}

.contact-info p {
    font-size: 1.2rem;
    margin: 15px 0;
    transition: color 0.3s ease;
}

.contact-info i {
    color: #fefefe;
    margin-right: 10px;
    transition: color 0.3s ease;
}

.contact-info a {
    color: #ffeb3b;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #ffeb3b;
}

.social-links {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.social-icon {
    color: #ffffff;
    font-size: 2rem;
    margin: 0 20px;
    padding: 10px;
    border-radius: 50%;
    transition: background 0.4s, transform 0.3s;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffeb3b;
    transform: scale(1.2);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
