:root {
    --primary: #4f46e5;
    --primary-accent: #06b6d4;
    --secondary: #7c3aed;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-light: #f9fafb;
    --text-muted: #64748b;
    --highlight: #f59e0b;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 12px 32px rgba(79, 70, 229, 0.15);
    --footer-bg: #0f172a;
    --max-width: 1200px;
    --header-height: 70px;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
body[data-theme="dark"] {
    --primary: #818cf8;
    --primary-accent: #22d3ee;
    --secondary: #a78bfa;
    --background: #0f172a;
    --surface: #1e293b;
    --text: #e2e8f0;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --highlight: #fbbf24;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 12px 32px rgba(129, 140, 248, 0.2);
    --footer-bg: #0f172a;
    --primary-rgb: 129, 140, 248;
    color-scheme: dark;
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    background-color: var(--background);
    color: var(--text);
    transition: var(--transition);
    overflow-x: hidden;
}
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--surface);
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: var(--header-height);
    width: 100%;
}

section {
    scroll-margin-top: var(--header-height);
    padding: 4rem 1rem;
    position: relative;
}

/* Only home section should be full height */
section.home {
    min-height: calc(100vh - var(--header-height));
    padding: 2rem 1rem;
}

nav {
    height: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    transition: var(--transition);
}
nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}
nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary);
    transition: width 0.3s ease;
}
nav a:hover::after {
    width: 100%;
}
nav a:hover {
    color: var(--primary);
}

/* Mobile navigation */
@media (max-width: 768px) {
    nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem;
        position: relative;
    }

    nav ul {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--surface);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 2rem 1rem;
        gap: 1.5rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
        box-shadow: var(--shadow);
        z-index: 999;
        height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }

    nav ul li {
        width: 100%;
        opacity: 0;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }

    nav ul.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    nav ul.active li {
        opacity: 1;
        transform: translateY(0);
    }

    nav ul a {
        display: block;
        width: 100%;
        padding: 1rem 2rem;
        text-align: center;
        font-size: 1.1rem;
        border-radius: var(--border-radius);
        transition: all 0.3s ease;
    }

    nav ul a:hover {
        background-color: var(--primary);
        color: var(--text-light);
    }

    nav ul a:hover::after {
        display: none;
    }

    .nav-controls {
        display: flex;
        align-items: center;
        gap: 1rem;
        z-index: 1000;
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        padding: 0.5rem;
        cursor: pointer;
        color: var(--text);
        transition: color 0.3s ease;
    }

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

    #theme-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        color: var(--text);
        transition: color 0.3s ease;
    }

    #theme-toggle:hover {
        color: var(--primary);
    }
}

.logo {
    width: 50px;
    height: 50px;
    background-image: url('./assets/icons/logo.png');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    border: 3px solid var(--primary);
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.logo:hover {
    transform: scale(1.1) rotate(10deg);
}

/* Navigation controls */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 0.5rem;
}

@media (min-width: 769px) {
    nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        max-width: var(--max-width);
        margin: 0 auto;
        padding: 0 2rem;
        height: 100%;
    }

    nav ul {
        display: flex;
        gap: 2.5rem;
        visibility: visible;
        opacity: 1;
        transform: none;
    }

    .nav-toggle {
        display: none;
    }

    .nav-controls {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    #theme-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        color: var(--text);
        transition: color 0.3s ease;
    }

    #theme-toggle:hover {
        color: var(--primary);
    }
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text);
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    position: relative;
}

#theme-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-mask: linear-gradient(#000 0 0) content-box,
                  linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box,
          linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: var(--transition);
}

#theme-toggle:hover {
    color: var(--primary);
    transform: scale(1.1);
}

#theme-toggle:hover::before {
    opacity: 1;
}
main {
    margin-top: -3rem;
}
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0rem 2rem;
}
h1, h2, h3, h4 {
    color: var(--text);
}
h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}
h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary);
    border-radius: 2px;
}

/* --- HOME SECTION --- */
.home {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.lefthome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    max-width: 550px;
}

.lefthome h1 {
    font-size: clamp(3rem, 6vw, 3rem);
    font-weight: 600;
    line-height: 0.5;
    margin: 0 0 1rem 0;
    color: var(--text);
    letter-spacing: -0.02em;
}

.lefthome .subtitle {
    font-size: clamp(1.25rem, 4vw, 2rem);
    color: var(--text-muted);
    margin: 0 0 3rem 0;
    font-weight: 500;
}

.lefthome button {
    padding: 1rem 2.5rem;
    background-color: #4F46E5;
    color: #ffffff;
    border: none;
    border-radius: 100px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lefthome button:hover {
    background-color: #4338CA;
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.4);
}

.righthome {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 500px;
}

.home img {
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--surface);
    box-shadow: 0 15px 40px rgba(136, 205, 239, 1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    z-index: 1;
}

.home img:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(60, 247, 184, 1, 0.2);
    border: 5px solid rgba(60, 247, 184, 1);
}

.righthome::before, .righthome::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.righthome::before {
    width: 120%;
    padding-bottom: 120%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.15), transparent 65%);
    transform: translate(-50%, -50%);
    filter: blur(70px);
}

.righthome::after {
    width: 110%;
    padding-bottom: 110%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.25), transparent 70%);
    transform: translate(-50%, -50%);
    filter: blur(50px);
    animation: pulse 6s ease-in-out infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.95); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(0.95); }
}

@media (max-width: 768px) {
    .home {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
        min-height: auto;
    }

    .lefthome {
        order: 2;
        align-items: center;
    }

    .righthome {
        order: 1;
    }

    .home img {
        max-width: 300px;
    }
}


/* --- ABOUT SECTION --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    justify-items: center;
}
.about-left p, .about-left ul {
    color: var(--text-muted);
    line-height: 1.7;
}
.about-left ul {
    list-style: none;
    padding-left: 0;
}
.about-left li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}
.about-left li::before {
    content: '✓';
    color: var(--primary-accent);
    position: absolute;
    left: 0;
}
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 3px solid var(--primary);

}
.timeline-item {
    margin-bottom: 2rem;
    position: relative;
}
.timeline-item:last-child {
    margin-bottom: 0;
}
.timeline-dot {
    position: absolute;
    left: -2.7rem;
    top: 5px;
    width: 1rem;
    height: 1rem;
    background-color: var(--highlight);
    border-radius: 50%;
    border: 3px solid var(--background);
}
.timeline-content h4 {
    margin: 0 0 0.25rem;
}
.timeline-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* --- SKILLS SECTION --- */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.skill-item {
    padding: 1.5rem 1rem;
    text-align: center;
    background-color: var(--surface);
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    min-height: 140px;
}

.skill-item:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 30px rgba(124, 58, 237, 0.3);
    background-color: var(--primary);
}

.skill-item img {
    width: 48px;
    height: 48px;
    margin-bottom: 0.75rem;
    object-fit: contain;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.skill-item:hover img {
    transform: scale(1.2);
}

.skill-item p {
    font-weight: 600;
    margin: 0;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.2;
    transition: color 0.3s ease;
}

.skill-item:hover p {
    color: var(--text-light);
}

/* --- PROJECTS & CERTIFICATES SECTION --- */
.project-grid, .certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card, .certificate-card {
    border: 1px solid rgba(124, 58, 237, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--surface);
    display: flex;
    flex-direction: column;
}

.project-card:hover, .certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.project-card img, .certificate-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.project-info, .certificate-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3, .certificate-card h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 700;
}

 .certificate-card h3 , .certificate-card p {
    padding : 6px;
 }



.project-info p, .certificate-card p {
    margin: 0 0 1rem 0;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.4;
    flex-grow: 1;
}

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

.tech-tag {
    background: var(--primary);
    color: var(--text-light);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

.project-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.btn-primary, .btn-secondary {
    flex: 1;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--text-light);
}

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

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

.btn-secondary:hover {
    background-color: var(--primary);
    color: var(--text-light);
    transform: translateY(-2px);
}


/* --- CONTACT SECTION --- */
.contact {
    background: linear-gradient(180deg, var(--background) 0%, var(--surface) 100%);
    padding: 0.5rem 1rem  2rem;
    margin
    text-align: center;
}
.contact-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
    line-height: 1.6;
}
.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 3rem auto;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.75rem;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.08);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: left;
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(99, 102, 241, 0.2);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-light);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    transition: all 0.3s ease;

}

.contact-item:hover .contact-icon {
    transform: scale(1.1) rotate(-5deg);
}
.contact-details h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 700;
}

.contact-details p,
.contact-details a {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-details a:hover {
    color: var(--secondary);
}
.social-links {
    text-align: center;
    /* margin-top: 4rem; */
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.social-link {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    box-shadow: var(--shadow);
}
.social-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.linkedin { background: rgba(14, 118, 168, 0.1); color: #0e76a8; }
.linkedin:hover { background: #0e76a8; color: white; }

.email { background: rgba(234, 67, 53, 0.1); color: #ea4335; }
.email:hover { background: #ea4335; color: white; }

.github { background: rgba(51, 51, 51, 0.1); color: #333; }
.github:hover { background: #333; color: white; }

.whatsapp { background: rgba(37, 211, 102, 0.1); color: #25d366; }
.whatsapp:hover { background: #25d366; color: white; }

/* --- FOOTER --- */
footer {
    background-color: var(--footer-bg);
    color: var(--text-light);
    text-align: center;
    font-weight: 600;
    padding: 2px;
}