/* ===== CSS Variables ===== */
:root {
    --bg-primary: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    --bg-secondary: linear-gradient(135deg, #fef3f8 0%, #f0e7ff 100%);
    --bg-card: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --accent: #6366f1;
    --accent-hover: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: rgba(99, 102, 241, 0.2);
    --shadow: 0 10px 40px rgba(99, 102, 241, 0.15);
    --shadow-hover: 0 20px 60px rgba(99, 102, 241, 0.25);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background-color: var(--accent);
    color: white;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
}

.highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    box-shadow: 0 2px 20px rgba(99, 102, 241, 0.08);
}

.navbar.scrolled {
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px;
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-roles {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    min-height: 60px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.role-text {
    color: var(--accent);
    font-weight: 600;
}

.cursor {
    color: var(--accent);
    animation: blink 1s infinite;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--accent);
    border-radius: 15px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

/* ===== Sections ===== */
section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 3rem;
}

/* ===== About Section ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-placeholder {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.about-details {
    display: grid;
    gap: 1.5rem;
}

.detail-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.detail-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.detail-card h4 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.detail-card .date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

/* ===== Skills Section ===== */
.skills {
    background: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.skill-category:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
    transform: translateY(-10px);
}

.category-icon {
    width: 70px;
    height: 70px;
    background: var(--accent-gradient);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-item span {
    color: var(--text-secondary);
    font-weight: 500;
}

.skill-bar {
    height: 8px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 10px;
    width: 0;
    transition: width 1s ease-out;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: var(--transition);
}

.tag:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

/* ===== Services Section ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
    transform: translateY(-10px);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--accent-gradient);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.service-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.service-link:hover {
    gap: 0.5rem;
}

/* ===== Projects Section ===== */
.projects {
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
    transform: translateY(-10px);
}

.project-header {
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-card p {
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.project-footer {
    margin-top: auto;
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.project-link:hover {
    gap: 0.5rem;
}

/* ===== Certifications Section ===== */
.cert-carousel {
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
}

.cert-track {
    display: flex;
    gap: 2rem;
    animation: scroll-certs 20s linear infinite;
}

.cert-card {
    min-width: 300px;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
}

.cert-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-10px);
}

.cert-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cert-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.cert-card p {
    color: var(--text-secondary);
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.carousel-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* ===== Achievements Section ===== */
.achievements {
    background: var(--bg-secondary);
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-gradient);
}

.timeline-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-card);
    border: 3px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    z-index: 1;
}

.timeline-content {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--border);
    flex-grow: 1;
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateX(10px);
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--text-secondary);
}

/* ===== Contact Section ===== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-info>p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.contact-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateX(10px);
}

.contact-item svg {
    color: var(--accent);
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.contact-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--accent);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-secondary);
    padding: 3rem 0 1.5rem;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-secondary);
}

.footer-links h4,
.footer-social h4 {
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--accent);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

/* ===== Scroll to Top ===== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(15px);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes scroll-certs {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transition: var(--transition);
        border-bottom: 1px solid var(--border);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .timeline::before {
        left: 15px;
    }

    .timeline-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .timeline-item {
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    section {
        padding: 60px 0;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
}