:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --bg-color: #ffffff;
    --card-bg: #f3f4f6;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-color: #3b82f6;
    --secondary-color: #60a5fa;
    --text-color: #f3f4f6;
    --bg-color: #111827;
    --card-bg: #1f2937;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.theme-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color);
}

main {
    margin-top: 4rem;
}

section {
    padding: 4rem 2rem;
}

.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.profile-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.profile-container:hover .profile-image {
    transform: scale(1.05);
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.highlight {
    color: var(--primary-color);
}

.hero-content h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.secondary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn:hover {
    transform: translateY(-2px);
}

.projects {
    background-color: var(--card-bg);
}

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

.project-card {
    background-color: var(--bg-color);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    height: 700px;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    position: relative;
    width: 100%;
    height: 550px;
    overflow: hidden;
    background-color: var(--card-bg);
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
}

.project-image:hover {
    transform: scale(1.02);
}

.project-image iframe {
    width: 100%;
    height: 100%;
    border: none;
    background-color: var(--bg-color);
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--card-bg);
}

.project-image iframe::-webkit-scrollbar {
    width: 8px;
}

.project-image iframe::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 4px;
}

.project-image iframe::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: var(--transition);
}

.project-image iframe::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.project-info {
    padding: 1rem;
    flex-shrink: 0;
}

.tech-stack {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.tech-stack span {
    background-color: var(--card-bg);
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.9rem;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.skill-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.skill-tags span {
    background-color: var(--card-bg);
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
}

.contact {
    background-color: var(--card-bg);
    position: relative;
}

.contact h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--card-bg);
    border-radius: 0.75rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group .error-message {
    position: absolute;
    bottom: -1.5rem;
    left: 0;
    color: #ef4444;
    font-size: 0.875rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.form-group.error .error-message {
    opacity: 1;
    transform: translateY(0);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.8rem;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
    background-color: var(--card-bg);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn.primary {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--card-bg);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .project-card{
        height: 90vh;
        margin: 0;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
    }
    .project-image{
        height: 80%;
        flex: 1;
    }
    .project-info {
        padding: 0.8rem;
        flex-shrink: 0;
    }
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
    }
    
    .contact h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .contact-info {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    width: 90%;
    height: 90vh;
    background-color: var(--bg-color);
    border-radius: 0.5rem;
    overflow: hidden;
}

.modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    z-index: 2001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    border-radius: 50%;
    transition: var(--transition);
}

.close-modal:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Blur effect for main content when modal is active */
body.modal-active main {
    filter: blur(5px);
    pointer-events: none;
}

.contact-form input:invalid,
.contact-form textarea:invalid {
    border-color: #ef4444;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Loading Animation */
.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn.sending {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    cursor: not-allowed;
}

.btn.sending .loading-spinner {
    display: inline-block;
}

/* Notification Messages */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem;
    border-radius: 0.5rem;
    color: white;
    max-width: 350px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background-color: #10b981;
}

.notification.error {
    background-color: #ef4444;
}

.notification.loading {
    background-color: var(--primary-color);
}

/* Form validation styles */
.form-group {
    position: relative;
    margin-bottom: 1rem;
}

.form-group .error-message {
    position: absolute;
    bottom: -20px;
    left: 0;
    color: #ef4444;
    font-size: 0.875rem;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

.form-group.error input,
.form-group.error textarea {
    border-color: #ef4444;
}