:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #131824;
    --bg-tertiary: #1a2032;
    --accent-primary: #4169e1;
    --accent-secondary: #5b8def;
    --accent-glow: rgba(65, 105, 225, 0.3);
    --text-primary: #e4e7f1;
    --text-secondary: #a0a8c5;
    --text-muted: #6b7399;
    --border-color: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --success-color: #10b981;
    --error-color: #ef4444;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 20% 30%, rgba(65, 105, 225, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 70%, rgba(91, 139, 239, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: gradientShift 15s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.logo::before {
    content: '</>';
    color: var(--accent-primary);
    font-weight: 700;
}

.logo:hover {
    color: var(--accent-secondary);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text h1 {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-text .subtitle {
    font-size: 1.5rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--accent-glow);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

.btn-submit.loading .btn-text {
    display: none;
}

.btn-submit.loading .btn-loader {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Hero Image with Profile Photo Support */
.hero-image {
    position: relative;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.profile-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.profile-image-wrapper {
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 32px var(--accent-glow);
    border: 3px solid var(--accent-primary);
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: white;
    font-weight: 700;
    box-shadow: 0 8px 32px var(--accent-glow);
}

.profile-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.profile-info p {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 1.5rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Section Styles */
section {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 12px 40px rgba(65, 105, 225, 0.2);
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.skill-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    color: var(--text-secondary);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.skill-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(65, 105, 225, 0.25);
    border-color: var(--accent-primary);
}

.project-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--accent-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    background-position: center;
    background-size: cover;
}

.project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(65, 105, 225, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-image::after {
    opacity: 1;
}

.project-content {
    padding: 2rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
}

.project-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--accent-secondary);
}

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    transition: all 0.3s ease;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 5rem;
    color: var(--accent-primary);
    opacity: 0.2;
    line-height: 1;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 12px 40px rgba(65, 105, 225, 0.2);
}

.testimonial-text {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.author-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.author-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

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

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(5px);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.contact-details p {
    color: var(--text-secondary);
}

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

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

/* Contact Form */
.contact-form {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

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

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.3s ease-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1.5rem;
    font-weight: 700;
}

.modal-content.success .modal-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 2px solid var(--success-color);
}

.modal-content.error .modal-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 2px solid var(--error-color);
}

.modal-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.modal-content .btn {
    min-width: 150px;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    text-align: center;
}

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

.social-link {
    width: 50px;
    height: 50px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-3px);
    border-color: var(--accent-primary);
}

footer p {
    color: var(--text-muted);
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 968px) {
    .hero-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .nav-links {
        display: none;
    }

    .portfolio-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 2rem;
    }

    .profile-image-wrapper {
        width: 150px;
        height: 150px;
    }

    .profile-placeholder {
        font-size: 4rem;
    }
}
