
/* Base Styles */
:root {
    /* Dark Mode Variables */
    --bg-color-dark: #1a1a2e;
    --text-color-dark: #e0e0e0;
    --glass-bg-dark: rgba(255, 255, 255, 0.08);
    --glass-border-dark: rgba(255, 255, 255, 0.18);
    --glass-shadow-dark: rgba(0, 0, 0, 0.2);
    --primary-color-dark: #00bcd4; /* Soft sky blue */
    --accent-color-dark: #e91e63;
    --button-bg-dark: rgba(0, 188, 212, 0.2);
    --button-hover-bg-dark: rgba(0, 188, 212, 0.4);
    --card-hover-shadow-dark: rgba(0, 188, 212, 0.4); /* Subtle glow for glass cards */
    --scroll-bar-thumb-dark: #00bcd4;
    --scroll-bar-track-dark: #333;
}

/* Light Mode Variables (overrides for body.light-mode) */
body.light-mode {
    --bg-color-dark: #f0f2f5;
    --text-color-dark: #333;
    --glass-bg-dark: rgba(255, 255, 255, 0.7);
    --glass-border-dark: rgba(220, 220, 220, 0.8);
    --glass-shadow-dark: rgba(0, 0, 0, 0.1);
    --primary-color-dark: #2196f3; /* Brighter blue for light mode */
    --accent-color-dark: #e91e63;
    --button-bg-dark: rgba(33, 150, 243, 0.2);
    --button-hover-bg-dark: rgba(33, 150, 243, 0.4);
    --card-hover-shadow-dark: rgba(33, 150, 243, 0.3);
    --scroll-bar-thumb-dark: #2196f3;
    --scroll-bar-track-dark: #ccc;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color-dark);
    color: var(--text-color-dark);
    line-height: 1.6;
    transition: background-color 0.5s ease, color 0.5s ease;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Data Science Background */
body::before,
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.08; /* Global opacity */
    transition: opacity 0.5s ease;
}

/* Subtle grid lines */
body::before {
    background-image:
        linear-gradient(to right, var(--primary-color-dark) 1px, transparent 1px),
        linear-gradient(to bottom, var(--primary-color-dark) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Subtle line chart/trend curves */
body::after {
    background:
        /* Top left curve */
        radial-gradient(circle at 15% 25%, var(--primary-color-dark) 0%, transparent 15%),
        /* Bottom right curve */
        radial-gradient(circle at 85% 75%, var(--primary-color-dark) 0%, transparent 15%),
        /* Diagonal line */
        linear-gradient(45deg, transparent 49%, var(--primary-color-dark) 49%, var(--primary-color-dark) 51%, transparent 51%),
        /* Another diagonal line */
        linear-gradient(-45deg, transparent 49%, var(--primary-color-dark) 49%, var(--primary-color-dark) 51%, transparent 51%);
    background-size: 100% 100%;
    background-repeat: no-repeat;
}


/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--scroll-bar-track-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--scroll-bar-thumb-dark);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color-dark);
}

/* Glass UI Elements */
.glass-panel, .glass-card, .skill-tag, .button, .round-button {
    background: var(--glass-bg-dark);
    border: 1px solid var(--glass-border-dark);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    border-radius: 15px;
    box-shadow: 0 4px 30px var(--glass-shadow-dark);
    transition: all 0.3s ease-in-out;
}

.glass-panel {
    padding: 40px;
    margin: 20px auto;
    max-width: 1200px;
}

.glass-card {
    padding: 20px;
    text-align: center;
}

.glass-panel:hover, .glass-card:hover, .skill-tag:hover, .button:hover, .round-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 40px var(--glass-shadow-dark), 0 0 15px var(--card-hover-shadow-dark);
}

/* Typography */
h1, h2, h3 {
    color: var(--primary-color-dark);
    margin-bottom: 20px;
}

h1 {
    font-size: 3em;
}

h2 {
    font-size: 2.5em;
    text-align: center;
    margin-top: 40px;
    margin-bottom: 30px;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--primary-color-dark);
    margin: 10px auto 0;
    border-radius: 2px;
}

h3 {
    font-size: 1.5em;
    color: var(--text-color-dark);
}

p {
    margin-bottom: 10px;
}

a {
    color: var(--primary-color-dark);
    text-decoration: none;
}

a:hover {
    color: var(--accent-color-dark);
}

/* Header/Hero Section */
.hero {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 60px 40px;
    flex-wrap: wrap;
    gap: 40px;
}

.hero-content {
    flex: 2;
    min-width: 300px;
    text-align: left;
}

.hero-content p {
    font-size: 1.2em;
    max-width: 600px;
    margin-top: 15px;
}

.hero-image {
    flex: 1;
    min-width: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color-dark);
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.6);
    transition: all 0.3s ease-in-out;
}

.hero-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--accent-color-dark);
}


/* About Section */
.about-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

.about-details {
    text-align: left;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-button {
    padding: 10px 20px;
    font-weight: bold;
    min-width: 120px;
    text-align: center;
}

/* Education Section */
.education-cards-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.education-card {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
}
.education-card h3 {
    margin-bottom: 10px;
    color: var(--primary-color-dark);
}
.education-card p {
    margin-bottom: 5px;
    color: var(--text-color-dark);
}

/* Skills Section */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.skill-tag {
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 25px;
    white-space: nowrap;
    text-align: center;
}
.skill-tag:hover {
    color: var(--accent-color-dark);
}

/* Projects Section */
.project-filters {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.project-filter-btn {
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    background: var(--button-bg-dark);
    border: 1px solid var(--primary-color-dark);
    color: var(--text-color-dark);
    transition: all 0.3s ease-in-out;
}

.project-filter-btn:hover {
    background: var(--button-hover-bg-dark);
    border-color: var(--accent-color-dark);
}

.project-filter-btn.active {
    background: var(--primary-color-dark);
    color: var(--bg-color-dark);
    box-shadow: 0 0 15px var(--card-hover-shadow-dark);
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    justify-content: center;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    padding: 20px;
    transition: all 0.4s ease-out; /* For filtering animation */
    overflow: hidden; /* Important for height transitions */
}

.project-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color-dark);
}

.project-card p {
    color: var(--text-color-dark);
    font-size: 0.9em;
}

.project-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.round-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--button-bg-dark);
    border: 1px solid var(--primary-color-dark);
    color: var(--primary-color-dark);
    font-size: 0.8em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    white-space: nowrap; /* Prevent text wrapping for short labels */
    overflow: hidden; /* Hide overflow if text is too long */
    text-indent: 100%; /* Hide text */
    position: relative;
}

.round-button:hover {
    background: var(--button-hover-bg-dark);
    border-color: var(--accent-color-dark);
    color: var(--accent-color-dark);
    transform: translateY(-3px);
    box-shadow: 0 0 10px var(--card-hover-shadow-dark);
}

/* Custom text for round buttons (since no icons allowed) */
.round-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-indent: 0;
    font-size: 0.8em; /* Adjust font size */
    color: var(--primary-color-dark);
    transition: color 0.3s ease-in-out;
}
.round-button:hover::after {
    color: var(--accent-color-dark);
}

.round-button[href*="github.com"]::after { content: 'Git'; }
.round-button[href*="linkedin.com"]::after { content: 'In'; }


/* Certifications Section */
.certifications-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.certification-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    text-align: center;
}

.certification-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color-dark);
}

.certification-card .button {
    margin-top: 10px;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    background: var(--button-bg-dark);
    border: 1px solid var(--primary-color-dark);
    color: var(--text-color-dark);
}

.certification-card .button:hover {
    background: var(--button-hover-bg-dark);
    border-color: var(--accent-color-dark);
    color: var(--accent-color-dark);
}

/* Contact Section */
.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.contact-button {
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 30px;
    background: var(--button-bg-dark);
    border: 1px solid var(--primary-color-dark);
    color: var(--text-color-dark);
}

.contact-button:hover {
    background: var(--button-hover-bg-dark);
    border-color: var(--accent-color-dark);
    color: var(--accent-color-dark);
}

/* Dark/Light Mode Toggle */
.theme-toggle {
    display: none;
}

.theme-toggle-label {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 30px;
    background-color: #555;
    border-radius: 15px;
    cursor: pointer;
    display: block;
    transition: background-color 0.3s;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.theme-toggle-label::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background-color: #f0f0f0;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.theme-toggle:checked + .theme-toggle-label {
    background-color: var(--primary-color-dark); /* Light mode background for toggle */
}

.theme-toggle:checked + .theme-toggle-label::before {
    transform: translateX(30px);
    background-color: white;
}

/* Scroll Animations */
.hidden {
    opacity: 0;
    transform: translateY(20px);
}

.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Project Filtering Animations */
.project-card.hidden-category {
    opacity: 0;
    max-height: 0; /* Use max-height for smooth transition */
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
    overflow: hidden;
    transform: scale(0.9);
    pointer-events: none;
    transition: all 0.4s ease-out;
}
.project-card.visible-category {
    opacity: 1;
    max-height: 500px; /* A sufficiently large value for visible state */
    padding: 20px; /* Restore original padding */
    margin-bottom: 20px; /* Restore original margin */
    transform: scale(1);
    pointer-events: auto;
    transition: all 0.4s ease-in;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        text-align: center;
    }

    .hero-image {
        order: -1; /* Move image above text on smaller screens */
    }

    .glass-panel {
        padding: 30px 20px;
        margin: 15px auto;
    }

    h1 {
        font-size: 2.5em;
    }

    h2 {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.8em;
    }

    .hero-image img {
        width: 200px;
        height: 200px;
    }

    .about-grid {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .about-details {
        text-align: center;
    }
    .social-links {
        justify-content: center;
    }

    .education-card, .project-card, .certification-card {
        min-width: unset;
        width: 100%;
        max-width: 400px;
    }

    .education-cards-container, .projects-container, .certifications-container {
        grid-template-columns: 1fr;
    }

    .project-filters button, .contact-button {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .glass-panel {
        padding: 20px 15px;
        margin: 10px auto;
    }

    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.5em;
    }

    .hero-content p {
        font-size: 1em;
    }

    .hero-image img {
        width: 150px;
        height: 150px;
    }

    .skills-container .skill-tag {
        font-size: 0.9em;
        padding: 8px 15px;
    }

    .project-filter-btn {
        font-size: 0.9em;
        padding: 8px 15px;
    }

    .round-button {
        width: 40px;
        height: 40px;
        font-size: 0.75em;
    }
    .round-button::after {
        font-size: 0.75em;
    }
}
