/* =============== VARIABLES =============== */
:root {
    /* Colors */
    --bg-main: #0b0f19;
    --bg-secondary: #111827;
    --bg-glass: rgba(11, 15, 25, 0.7);
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-primary: #3b82f6; /* Blue */
    --accent-secondary: #8b5cf6; /* Purple */
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --card-bg: rgba(30, 41, 59, 0.5);
    --card-border: rgba(255, 255, 255, 0.08);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Layout */
    --max-width: 1600px;
    --section-padding: 80px 5%;
}

/* =============== CSS RESET =============== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* =============== GLOBAL TYPOGRAPHY =============== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: #ffffff;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* =============== REUSABLE UTILITIES =============== */
.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.section {
    padding: var(--section-padding);
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

/* Base Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.5);
}

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

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-3px);
}

.btn-nav {
    padding: 8px 20px;
    background: var(--accent-gradient);
    color: #fff;
}

/* =============== ANIMATED BACKGROUND =============== */
.blob {
    position: absolute;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    top: 10%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    border-radius: 50%;
}

.blob-2 {
    top: 40%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    border-radius: 50%;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(50px) scale(1.1); }
}

/* =============== NAVBAR =============== */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a:not(.btn) {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 5px;
}

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

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

.nav-links a:not(.btn):hover {
    color: #fff;
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: #fff;
}

/* =============== HERO SECTION =============== */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    padding-top: 100px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.greeting {
    font-size: 1.2rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 10px;
}

.name {
    font-size: 4.5rem;
    margin-bottom: 10px;
    line-height: 1.1;
}

.role {
    font-size: 2rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.hero-cta {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    font-size: 1.5rem;
    color: #fff;
}

.social-links a:hover {
    background: var(--accent-gradient);
    transform: translateY(-5px);
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.4);
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.avatar-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-backdrop {
    position: absolute;
    width: 380px;
    height: 380px;
    background: var(--accent-gradient);
    border-radius: 50%;
    z-index: 1;
    opacity: 0.15;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 80px 20px var(--accent-primary);
    animation: pulse 4s infinite alternate ease-in-out;
}

.hero-image {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 55% 10px; /* Lowers the image inside the circle so the head has breathing room */
    z-index: 2;
    position: relative;
    border: 4px solid var(--accent-primary);
    background-color: #0f172a;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    
    /* Hardware acceleration & image optimization */
    transform: translateZ(0);
    filter: contrast(1.03) saturate(1.05) brightness(1.02);
    
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-image:hover {
    transform: scale(1.15) translateY(-8px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.8), 0 0 40px var(--accent-primary);
}

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

/* =============== ABOUT SECTION =============== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.about-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    border-color: rgba(59, 130, 246, 0.3);
}

.icon-wrapper {
    width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.card-icon {
    font-size: 1.8rem;
    color: var(--accent-primary);
}

.about-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.edu-item h4 {
    color: var(--accent-primary);
    margin-bottom: 5px;
}

.edu-item .institution {
    font-weight: 500;
    margin-bottom: 10px;
}

.edu-item .year {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* =============== SKILLS SECTION =============== */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 30px;
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--accent-secondary);
}

.cat-icon {
    font-size: 2rem;
    color: var(--accent-secondary);
    margin-bottom: 15px;
}

.skill-category h3 {
    margin-bottom: 20px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: default;
}

.tag:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

/* =============== PROJECTS SECTION =============== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border-color: var(--accent-primary);
}

.project-header {
    height: 140px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--card-border);
}

.project-icon {
    font-size: 4rem;
    color: var(--accent-primary);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.project-card:hover .project-icon {
    transform: scale(1.1);
    opacity: 1;
    color: var(--accent-secondary);
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.project-info p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.sm-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    color: var(--accent-primary);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
}

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

.project-link i {
    font-size: 1.1rem;
}

/* =============== EXPERIENCE & CERTS =============== */
.exp-cert-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.timeline-container h3, .certifications h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.timeline-container h3 i, .certifications h3 i {
    color: var(--accent-primary);
}

.timeline {
    position: relative;
    border-left: 2px solid var(--card-border);
    margin-left: 10px;
    padding-left: 30px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    left: -39px;
    top: 5px;
    box-shadow: 0 0 0 4px var(--bg-main);
}

.timeline-content h4 {
    color: var(--accent-primary);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.timeline-content .company {
    color: #fff;
    font-weight: 500;
    margin-bottom: 15px;
}

.timeline-content .company span {
    color: var(--text-muted);
    font-weight: 400;
}

.timeline-content .desc {
    color: var(--text-muted);
}

.cert-list li {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease;
}

.cert-list li:hover {
    transform: translateX(10px);
    border-color: rgba(139, 92, 246, 0.3);
}

.cert-list li i {
    color: var(--accent-secondary);
    font-size: 1.2rem;
}

/* =============== CONTACT =============== */
.cta-banner {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(59,130,246,0.05)"/></svg>') center/cover, var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 30px;
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-banner h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-banner p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
    font-size: 1.1rem;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--card-border);
    border-radius: 30px;
    font-weight: 500;
    font-size: 1.1rem;
}

.contact-link:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
    transform: translateY(-3px);
}

.contact-link i {
    color: var(--accent-primary);
    font-size: 1.3rem;
}

/* =============== FOOTER =============== */
footer {
    background: #060910;
    padding: 60px 20px 20px;
    border-top: 1px solid var(--card-border);
    text-align: center;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: #64748b;
    font-size: 0.9rem;
}

/* =============== ANIMATIONS (SCROLL) =============== */
.hidden {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hidden-up {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hidden-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hidden-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.show {
    opacity: 1;
    transform: translate(0, 0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* =============== RESPONSIVE PORTAIT (MOBILE) =============== */
@media (max-width: 900px) {
    .hero {
        flex-direction: column-reverse;
        justify-content: center;
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-content {
        margin-top: 50px;
    }
    
    .hero-cta, .social-links {
        justify-content: center;
    }
    
    .hero-image-container {
        width: 100%;
        justify-content: center;
        align-items: center;
    }

    .avatar-wrapper {
        margin: 0 auto;
    }

    .hero-image-backdrop {
        width: 300px;
        height: 300px;
    }
    
    .hero-image {
        width: 250px;
        height: 250px;
    }
    
    .about-grid, .exp-cert-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 30px 0;
        gap: 20px;
        transform: translateY(-150%);
        transition: transform 0.4s ease;
        border-bottom: 1px solid var(--card-border);
        z-index: -1;
    }
    
    .nav-links.active {
        transform: translateY(0);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }
    
    .menu-toggle {
        display: block;
    }
    
    .footer-inner {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .name {
        font-size: 3rem;
    }
    .role {
        font-size: 1.5rem;
    }
    .section-header h2 {
        font-size: 2rem;
    }
    .hero-cta {
        flex-direction: column;
    }
    .btn {
        width: 100%;
    }
}
