@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

/* Default Light Mode Variables */
:root {
    /* Light Mode (Default) */
    --bg-gradient-start: #fbc2eb;
    --bg-gradient-end: #a6c1ee;
    --card-bg: rgba(255, 255, 255, 0.4);
    --border-color: rgba(255, 255, 255, 0.6);
    --text-color: #222b38;
    --heading-color: #0f172a;
    --accent-color: #6366f1;
    --shadow-color: rgba(99, 102, 241, 0.2);
}

/* Dark Mode Overrides */

html[data-theme='dark'] {
    /* Dark Mode */
    --bg-gradient-start: #0f2027;
    --bg-gradient-mid: #203a43;
    --bg-gradient-end: #2c5364;
    --card-bg: rgba(13, 17, 23, 0.5);
    --border-color: rgba(0, 247, 255, 0.2);
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --accent-color: #00f7ff;
    --shadow-color: rgba(0, 247, 255, 0.2);
}

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

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    background: linear-gradient(45deg, var(--bg-gradient-start), var(--bg-gradient-end));
    background-size: 400% 400%;
    animation: gradient-animation 15s ease infinite;
    perspective: 1500px;
    transition: background 0.4s ease;
    color: var(--text-color); /* Apply the theme's text color to the body */
}

@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.glass-card {
    width: 90vw;
    max-width: 900px;
    height: 85vh;
    max-height: 650px;
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s ease, background 0.4s ease, border 0.4s ease;
    transform-style: preserve-3d;
    display: flex;
    overflow: hidden;
}

/* --- Sidebar --- */
.sidebar {
    width: 35%;
    padding: 2.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.profile-pic {
    width: 200px; /* Adjusted for better proportion */
    height: 190px;
    border-radius: 50%;
    border: 4px solid var(--accent-color);
    margin: 0 auto 1.5rem; /* Center horizontally */
    box-shadow: 0 0 25px var(--shadow-color);
    overflow: hidden;
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 2rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 0.25rem;
}

.profile-title {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--accent-color);
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 2rem 0;
}

.social-links a {
    color: var(--text-color);
    transition: transform 0.3s, filter 0.3s;
    display: inline-flex;
}

.social-links a:hover {
    transform: translateY(-5px);
    filter: drop-shadow(0 0 8px var(--shadow-color));
    color: var(--accent-color); /* Highlight on hover */
}

.social-links img {
    width: 32px;
    height: auto;
}

.social-links .fa-envelope, .social-links .fa-phone {
    font-size: 2rem;
}

html[data-theme='dark'] .github-logo {
    filter: invert(1);
}

.download-cv {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--accent-color);
    color: #fff; /* White text looks good on both light/dark accent colors */
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.download-cv:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--accent-color);
}

#theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    z-index: 100;
}

/* --- Main Content --- */
.main-content {
    width: 65%;
    padding: 2.5rem;
    overflow-y: auto;
    border-left: 1px solid var(--border-color);
}

.main-content::-webkit-scrollbar { width: 5px; }
.main-content::-webkit-scrollbar-track { background: transparent; }
.main-content::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}

.section { margin-bottom: 2.5rem; }

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--heading-color);
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.about-text, .timeline-desc, .project-item p, .achievements-list li {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-color); /* Ensure all paragraphs use the theme color */
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    height: calc(100% - 10px);
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 5px;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--accent-color);
    border: 3px solid var(--card-bg);
}

.timeline-role {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--heading-color);
}

.timeline-company {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--heading-color);
}

html[data-theme='dark'] .skill-tag {
    background: rgba(255, 255, 255, 0.1);
}

.skill-tag i { font-size: 1.2rem; }

.projects-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.project-item {
    background: rgba(0,0,0,0.05);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}
html[data-theme='dark'] .project-item {
    background: rgba(255,255,255,0.05);
}

.project-item .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.project-item .spotify-icon { color: #1DB954; }
.project-item .password-icon { color: #FFD700; }

.project-item h4 {
    font-size: 1.1rem;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
}

.achievements-list {
    list-style-type: '';
    padding-left: 2rem;
}

.achievements-list li {
    padding-left: 15px;
    margin-bottom: 0.8rem;
}


/* --- Responsive Design --- */
@media (max-width: 900px) {
    .glass-card {
        flex-direction: column;
        height: 95vh;
        max-height: none;
    }
    .sidebar, .main-content {
        width: 100%;
        border: none;
    }
    .sidebar {
        height: auto;
        padding-bottom: 1.5rem;
    }
    .main-content {
        padding-top: 1.5rem;
    }
}


@media (max-width: 768px) {
    body {
        align-items: flex-start;
        padding: 1rem;
        overflow: auto;
        height: auto;
    }
    .glass-card {
        height: auto;
    }
    .main-content {
        padding: 2rem 1.5rem;
    }
    #theme-toggle {
        top: 1rem;
        right: 1rem;
    }
    .projects-container {
        grid-template-columns: 1fr;
    }
}
