:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --primary: #3b82f6;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --white: #ffffff;
    --glass: rgba(30, 41, 59, 0.7);
    --border: rgba(255, 255, 255, 0.1);
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- Animated Blobs Background --- */
.blob-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: move 20s infinite alternate;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: var(--secondary);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* --- Utility Classes --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    width: 100%;
}

.alt-bg {
    background: rgba(255, 255, 255, 0.02);
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}

.dot {
    color: var(--accent);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

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

.btn-contact {
    background: var(--gradient);
    color: var(--white) !important;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.hamburger {
    display: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

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

.hero-content {
    max-width: 800px;
}

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

.hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--white);
}

.hero h2 {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 400;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

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

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--white);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--white);
    transform: translateY(-3px);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: 0.3s;
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-secondary);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* --- Profile Section --- */
.profile-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.profile-card p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.profile-card strong {
    color: var(--white);
}

.interest-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid var(--primary);
    border-radius: 0 10px 10px 0;
}

.interest-box h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

/* --- Timeline / Experience --- */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--border);
    margin-left: 20px;
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
    padding-left: 60px;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 3px solid var(--primary);
    z-index: 2;
}

.timeline-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border);
    transition: 0.3s;
}

.timeline-content:hover {
    transform: translateX(10px);
    border-color: var(--primary);
}

.timeline-header {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.timeline-header h3 {
    color: var(--white);
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.timeline-header .company {
    color: var(--accent);
    font-weight: 600;
    display: block;
}

.timeline-header .date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: block;
    margin-top: 0.3rem;
}

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

.timeline-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

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

/* --- Education --- */
.education-card {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.edu-icon {
    font-size: 4rem;
    color: var(--secondary);
    margin-right: 2rem;
    background: rgba(139, 92, 246, 0.1);
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.edu-info h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.institution {
    color: var(--accent);
    font-size: 1.1rem;
}

.edu-date {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.edu-details p {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.cert-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--border);
    text-align: center;
    transition: 0.3s;
}

.cert-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
}

.cert-card i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.cert-card h4 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.cert-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.skill-category {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.skill-category h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h3 i {
    color: var(--primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tag {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s;
}

.tag:hover {
    background: var(--primary);
    color: var(--white);
}

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

.achievement-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
}

.achievement-card h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.achievement-card p {
    color: var(--text-secondary);
}

/* --- Footer --- */
footer {
    background: #0b1120;
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.contact-info h2 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.email-link {
    color: var(--primary);
    font-size: 1.5rem;
    text-decoration: none;
    font-weight: 600;
    display: block;
    margin: 1rem 0;
}

.email-link:hover {
    text-decoration: underline;
}

.footer-social a {
    color: var(--text-secondary);
    margin-left: 2rem;
    text-decoration: none;
    font-size: 1.1rem;
    transition: 0.3s;
}

.footer-social a:hover {
    color: var(--white);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
        margin-bottom: 0.8rem;
    }

    .hero h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .profile-card {
        padding: 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .timeline::before {
        left: 20px;
        margin-left: 0;
    }

    .timeline-dot {
        left: 11px;
    }

    .timeline-item {
        padding-left: 40px;
        margin-bottom: 2.5rem;
    }

    .timeline-content {
        padding: 1.25rem;
    }

    .education-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .edu-icon {
        margin-right: 0;
        margin-bottom: 1.5rem;
        width: 80px;
        height: 80px;
        font-size: 3rem;
    }

    .edu-info h3 {
        font-size: 1.3rem;
    }

    .edu-details {
        justify-content: center;
        font-size: 0.95rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .contact-info h2 {
        font-size: 1.7rem;
    }

    .email-link {
        font-size: 1.2rem;
    }

    .footer-social {
        margin-top: 2rem;
    }

    .footer-social a {
        margin: 0.5rem 1rem;
    }
}

/* --- Experience Showcase (New Design) --- */
.experience-showcase {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding-top: 2rem;
}

.showcase-row {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.showcase-row.reverse {
    flex-direction: row-reverse;
}

.showcase-text {
    flex: 1;
}

.showcase-media {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.tilted-image {
    width: 100%;
    max-width: 350px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transform: rotate(-3deg) scale(0.95);
    transition: all 0.4s ease;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.tilted-image:hover {
    transform: rotate(0) scale(1.05);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.3);
    z-index: 10;
}

/* --- Stacked Gallery --- */
.stacked-gallery {
    position: relative;
    width: 300px;
    height: 220px;
}

.gallery-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    background: var(--card-bg);
    /* Ensure background is opaque for stacking */
}

/* First item (Top) */
.stacked-gallery .gallery-img:nth-child(1) {
    top: 0;
    left: 0;
    transform: rotate(-3deg);
    z-index: 10;
}

/* Second item */
.stacked-gallery .gallery-img:nth-child(2) {
    top: 5px;
    left: 5px;
    transform: rotate(3deg);
    z-index: 9;
}

/* Third item */
.stacked-gallery .gallery-img:nth-child(3) {
    top: 10px;
    left: 10px;
    transform: rotate(-2deg);
    z-index: 8;
}

/* Fourth item */
.stacked-gallery .gallery-img:nth-child(4) {
    top: 15px;
    left: 15px;
    transform: rotate(1deg);
    z-index: 7;
}

/* Fifth item */
.stacked-gallery .gallery-img:nth-child(5) {
    top: 20px;
    left: 20px;
    transform: rotate(-1deg);
    z-index: 6;
}

/* Items beyond 5 are hidden or piled */
.stacked-gallery .gallery-img:nth-child(n+6) {
    top: 20px;
    left: 20px;
    z-index: 1;
    opacity: 0;
}

/* Hover effects */
.stacked-gallery:hover .gallery-img:nth-child(1) {
    transform: translate(-10px, -10px) rotate(-5deg);
}

.stacked-gallery:hover .gallery-img:nth-child(2) {
    transform: translate(10px, -5px) rotate(5deg);
}

.stacked-gallery:hover .gallery-img:nth-child(3) {
    transform: translate(0, 10px) rotate(0deg);
}


/* --- Responsive Timeline Update --- */
@media (max-width: 768px) {
    .experience-showcase {
        gap: 2rem;
    }

    .showcase-row {
        flex-direction: column;
        gap: 1.5rem;
    }

    .showcase-row.reverse {
        flex-direction: column;
    }

    .showcase-text {
        width: 100%;
    }

    .showcase-media {
        width: 100%;
    }

    .tilted-image {
        transform: rotate(0);
        max-width: 100%;
    }

    .stacked-gallery {
        width: 100%;
        height: 200px;
        margin: 0 auto;
    }


    .gallery-img {
        width: 90%;
        left: 5%;
    }
}

/* --- Research Timeline (Nested) --- */
.research-timeline {
    margin-top: 2rem;
    padding-left: 1rem;
    border-left: 2px dashed rgba(255, 255, 255, 0.1);
}

.research-block {
    position: relative;
    margin-bottom: 4rem;
    padding-left: 1.5rem;
}

.research-block::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    background: var(--secondary);
    border-radius: 50%;
    margin-top: 5px;
}

.research-date {
    display: block;
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.research-block h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

/* Side-by-Side Layout */
.research-body {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Alternating Zigzag Layout */
.research-block:nth-child(even) .research-body {
    flex-direction: row-reverse;
}

.research-body p {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Vertical Image Container */
.research-img-container {
    flex: 0 0 280px;
    /* Fixed width for the gallery column */
    height: 380px;
    /* Vertical aspect ratio for documents */
    margin-top: 0;
    border-radius: 8px;
    position: relative;
    perspective: 1000px;
}

/* Adjust internal gallery to fill the container */
.research-img-container .stacked-gallery {
    width: 100%;
    height: 100%;
    margin: 0;
}

.research-img-container:hover {
    /* Remove border/shadow from container as the images have them */
    box-shadow: none;
    border-color: transparent;
}

/* Override gallery image sizing for vertical documents if needed */
.research-img-container .gallery-img {
    object-position: top center;
    /* Show top of documents */
}

.highlight-block {
    background: rgba(6, 182, 212, 0.05);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(6, 182, 212, 0.1);
    margin-left: -1rem;
    width: calc(100% + 1rem);
    /* Compensate margin */
}

.highlight-block::before {
    display: none;
}

/* --- NLHPC Section --- */
.nlhpc-container {
    margin-top: 3rem;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.nlhpc-logo {
    height: 60px;
    max-width: 100%;
    object-fit: contain;
    opacity: 0.9;
    transition: 0.3s;
}

.nlhpc-container:hover .nlhpc-logo {
    opacity: 1;
    transform: scale(1.05);
}

.nlhpc-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 500px;
}

.nlhpc-text strong {
    color: var(--accent);
}

/* --- Responsive Research Timeline --- */
@media (max-width: 768px) {
    .research-block {
        margin-bottom: 3rem;
        padding-left: 1rem;
    }

    .research-body {
        flex-direction: column;
        gap: 1.5rem;
    }

    .research-block:nth-child(even) .research-body {
        flex-direction: column;
    }

    .research-img-container {
        width: 100%;
        max-width: 300px;
        height: 350px;
        margin: 0 auto;
        flex: none;
    }

    .highlight-block {
        width: 100%;
        margin-left: 0;
    }
}