:root {
    --primary-color: #7b68ee;
    --secondary-color: #00bfff;
    --text-color: #e0e0e0;
    --background-color: #121212;
    --card-background: #1e1e1e;
    --hover-color: #2d2d2d;
    --accent-glow: rgba(123, 104, 238, 0.4);
}

:root[data-theme="light"] {
    --primary-color: #6c5ce7;
    --secondary-color: #0984e3;
    --text-color: #2d3436;
    --background-color: #f5f6fa;
    --card-background: #ffffff;
    --hover-color: #dfe6e9;
    --accent-glow: rgba(108, 92, 231, 0.3);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 20px var(--accent-glow);
    transition: all 0.4s ease;
}

.profile-pic:hover {
    transform: scale(1.05) rotate(5deg);
    border-color: var(--secondary-color);
    box-shadow: 0 0 30px var(--secondary-color);
}

h1 {
    color: var(--primary-color);
    font-size: 2.8rem;
    margin-top: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

h2 {
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--card-background);
    border-radius: 15px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    border: 2px solid transparent;
    transition: all 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.project-card:hover::before {
    border-color: var(--primary-color);
}

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    transition: transform 0.4s ease;
    background-color: var(--card-background);
    padding: 10px;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-card h3 {
    padding: 1.2rem;
    text-align: center;
    font-size: 1.3rem;
    background: linear-gradient(to right, var(--card-background), var(--hover-color));
    border-top: 2px solid var(--primary-color);
}

.contact {
    margin-top: 5rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-size: 1.3rem;
    padding: 1rem 2rem;
    background: var(--card-background);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
    background: var(--hover-color);
}

.contact-item i {
    color: var(--secondary-color);
    font-size: 1.6rem;
    transition: transform 0.3s ease;
}

.contact-item:hover i {
    transform: scale(1.2);
}

.contact-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--secondary-color);
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle .sun {
    fill: var(--text-color);
    transform-origin: center center;
}

.theme-toggle .moon {
    fill: var(--text-color);
    transform-origin: center center;
    display: none;
}

[data-theme="light"] .theme-toggle .sun {
    display: none;
}

[data-theme="light"] .theme-toggle .moon {
    display: block;
}

.theme-toggle:hover svg {
    transform: rotate(45deg);
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .profile-pic {
        width: 150px;
        height: 150px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .contact-item {
        padding: 0.8rem 1.5rem;
        font-size: 1.1rem;
    }
}