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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated background particles */
.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(99, 102, 241, 0.5);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.5;
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    color: #e5e7eb;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #6366f1;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    transition: width 0.3s ease;
}

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

/* Sections */
section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 2rem;
    position: relative;
    overflow: hidden;
    border: 4px solid transparent;
    background: linear-gradient(45deg, #6366f1, #8b5cf6) border-box;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 50px rgba(99, 102, 241, 0.4);
}

.profile-image::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: linear-gradient(45deg, #6366f1, #8b5cf6, #ec4899, #6366f1);
    background-size: 200% 200%;
    animation: gradientRotate 3s ease infinite;
    z-index: -1;
}

@keyframes gradientRotate {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #374151, #4b5563);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #9ca3af;
    border-radius: 50%;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff, #e5e7eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content .subtitle {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: #6366f1;
    margin-bottom: 2rem;
    font-weight: 600;
}

.hero-content p {
    font-size: 1.1rem;
    color: #d1d5db;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.hero.blur {
    filter: blur(8px) brightness(0.6);
    pointer-events: none;
    transition: filter 0.5s ease;
}

/* Section titles */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    border-radius: 2px;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(99, 102, 241, 0.3);
}

.project-card h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.project-card p {
    color: #d1d5db;
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: rgba(99, 102, 241, 0.2);
    color: #6366f1;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

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

.project-link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #8b5cf6;
}

/* Writing Section */
.writing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.writing-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.writing-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.35);
}

.writing-meta {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    color: #94a3b8;
}

.writing-card h3 {
    color: #fff;
    font-size: 1.3rem;
    line-height: 1.4;
}

.writing-card p {
    color: #cbd5f5;
    flex: 1;
}

.writing-link {
    color: #a78bfa;
    font-weight: 600;
    text-decoration: none;
    align-self: flex-start;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(167, 139, 250, 0.4);
}

.writing-link:hover {
    color: #c4b5fd;
    border-color: rgba(196, 181, 253, 0.7);
}

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

.certificate-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.certificate-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
}

.cert-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.certificate-card h3 {
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.cert-issuer {
    color: #6366f1;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cert-date {
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Contact Section */
.contact {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    margin: 4rem auto;
    padding: 3rem 2rem;
    border-radius: 20px;
    max-width: 720px;
    color: #e5e7eb;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #6366f1;
    font-weight: 700;
}

.contact p {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem 2.5rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #e5e7eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    transition: 
        background-color 0.3s ease,
        color 0.3s ease,
        box-shadow 0.3s ease;
}

.contact-link:hover,
.contact-link:focus {
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.15);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    outline: none;
}

.contact-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.phone-icon {
    font-size: 1.3rem;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Add project button */
.add-project-btn {
    background: rgba(99, 102, 241, 0.1);
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    color: #6366f1;
    position: relative;
    overflow: hidden;
}

.add-project-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
}

.add-project-btn .plus-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

/* Project form modal */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.project-modal.active {
    display: flex;
}

.modal-content {
    background: rgba(15, 15, 35, 0.95);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header h3 {
    color: #ffffff;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #6366f1;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(99, 102, 241, 0.1);
}

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

.form-group label {
    display: block;
    color: #e5e7eb;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
}

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

.tech-input-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.tech-input {
    flex: 1;
    min-width: 120px;
}

.add-tech-btn {
    background: rgba(99, 102, 241, 0.2);
    border: none;
    color: #6366f1;
    padding: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.add-tech-btn:hover {
    background: rgba(99, 102, 241, 0.3);
}

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

.removable-tag {
    background: rgba(99, 102, 241, 0.2);
    color: #6366f1;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remove-tag {
    background: none;
    border: none;
    color: #6366f1;
    cursor: pointer;
    font-size: 0.8rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-secondary {
    background: rgba(107, 114, 128, 0.2);
    color: #e5e7eb;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(107, 114, 128, 0.3);
}

.btn-primary {
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

/* Hamburger styles */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #e5e7eb;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Mobile Nav */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        right: 0;
        background: rgba(15, 15, 35, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        width: 200px;
        padding: 1rem;
        gap: 1rem;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .hamburger {
        display: flex;
    }
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.cv-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.cv-modal.active {
    display: flex;
}

.cv-modal .modal-content {
    background: #fff;
    width: 80%;
    max-width: 900px;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.cv-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cv-modal .modal-actions a {
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.cv-modal .btn-primary {
    background: #007bff;
    color: white;
}

.cv-modal .btn-secondary {
    background: #ddd;
    color: #333;
}


/* Responsive */
@media (max-width: 600px) {
    .contact {
        margin: 2rem 1rem;
        padding: 2rem 1rem;
    }

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

    .contact p {
        font-size: 1rem;
    }

    .contact-links {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-link {
        justify-content: center;
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }

    .contact-icon {
        width: 20px;
        height: 20px;
    }
}