/* Base Styles */
:root {
    --primary-blue: #4E7D96;
    --accent-orange: #FF844B;
    --light-bg: #E3EDF2;
    --secondary-green: #0A0D25;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
}

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

.section {
    padding: 80px 20px;
    min-height: 100vh;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-logo {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.nav-brand a:hover .nav-logo {
    transform: scale(1.05);
}

.nav-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-orange);
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-blue);
    cursor: pointer;
}

/* Hero Section */
.home-section {
    padding-top: 100px;
}

.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--light-bg) 0%, rgba(78, 125, 150, 0.1) 100%);
    border-radius: 20px;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
    transition: opacity 0.3s ease;
}

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

.hero-image-container {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--white);
    box-shadow: 0 10px 30px rgba(78, 125, 150, 0.3);
    display: block; /* Ensure image displays on mobile */
    margin: 0 auto; /* Center the image horizontally */
}

.hero-title {
    font-size: 3rem;
    color: var(--secondary-green);
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.8;
    font-style: italic;
}

/* Portfolio Overview */
.portfolio-overview {
    max-width: 900px;
    margin: 0 auto 60px;
    text-align: center;
    position: relative;
    z-index: 2;
    background-color: var(--light-bg);
    padding: 20px;
    border-radius: 15px;
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    color: var(--secondary-green);
    margin-bottom: 20px;
    text-align: center;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.8;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.subsection-title {
    font-size: 1.8rem;
    color: var(--primary-blue);
    margin-bottom: 30px;
    text-align: center;
}

/* Timeline */
.timeline {
    max-width: 800px;
    margin: 0 auto 60px;
    position: relative;
    padding-left: 40px;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -46px;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-orange);
    border: 3px solid var(--white);
}

.timeline-date {
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 10px;
}

.timeline-content h4 {
    color: var(--secondary-green);
    margin-bottom: 5px;
}

.timeline-content .company {
    color: var(--accent-orange);
    font-weight: 500;
    margin-bottom: 10px;
}

.timeline-content .description {
    color: var(--text-light);
}

/* Certificates */
.certificates-section {
    margin-bottom: 60px;
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.certificate-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    padding: 20px;
}

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

.certificate-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
    background: var(--light-bg);
}

.certificate-card h4 {
    color: var(--secondary-green);
    margin-bottom: 10px;
}

.certificate-card p {
    color: var(--text-light);
}

/* Competitions Section - As standalone section */
.competitions-section {
    background: var(--white);
    padding: 80px 20px;
}

.competitions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.competition-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.competition-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--accent-orange), var(--primary-blue));
}

.competition-card h4 {
    padding: 20px 20px 10px;
    font-size: 1.1rem;
    color: var(--secondary-green);
}

.competition-rank {
    padding: 0 20px;
    color: var(--accent-orange);
    font-weight: 600;
    font-size: 1rem;
}

.competition-card p:last-child {
    padding: 10px 20px 20px;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Projects Section */
.projects-section {
    background: var(--white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background: var(--light-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-orange));
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    color: var(--secondary-green);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.project-content p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tech-tag {
    background: var(--primary-blue);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-orange);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

/* Articles Section */
.articles-section {
    background: var(--light-bg);
}

.articles-list {
    max-width: 900px;
    margin: 0 auto;
}

.article-card {
    background: var(--white);
    border-radius: 20px;
    margin-bottom: 35px;
    box-shadow: 0 5px 25px rgba(78, 125, 150, 0.12);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    overflow: visible;
    min-height: 280px;
    border: 2px solid transparent;
    position: relative;
    padding: 20px;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, var(--primary-blue), var(--accent-orange)) border-box;
}

.article-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 45px rgba(78, 125, 150, 0.25);
}

.article-card:hover .article-image {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 20px 40px rgba(255, 132, 75, 0.3);
}

.article-card:hover .article-image::before {
    transform: scale(1.15);
    opacity: 0.7;
}

.article-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-orange));
    position: relative;
    overflow: hidden;
    border: 4px solid var(--white);
    box-shadow: 0 10px 30px rgba(78, 125, 150, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-right: 30px;
}

/* Decorative ring around image */
.article-image::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border-radius: 50%;
    border: 2px dashed var(--accent-orange);
    opacity: 0.5;
    transition: all 0.4s ease;
    animation: rotate 20s linear infinite;
}

/* Gradient overlay for depth */
.article-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255, 255, 255, 0.3) 0%,
        transparent 70%
    );
    pointer-events: none;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.article-content {
    padding: 20px 30px 20px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.article-header {
    margin-bottom: 15px;
}

.article-title {
    color: var(--secondary-green);
    font-size: 1.4rem;
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.article-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.article-date {
    color: var(--primary-blue);
    font-weight: 600;
}

.article-venue {
    color: var(--text-light);
    font-style: italic;
    font-size: 0.9rem;
    background: rgba(31, 79, 104, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.article-authors {
    margin-bottom: 15px;
    color: var(--text-dark);
}

.author {
    font-weight: 500;
}

.article-abstract {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 0.95rem;
    text-align: justify;
}

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

.article-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.paper-link {
    background: var(--primary-blue);
    color: var(--white);
}

.paper-link:hover {
    background: var(--secondary-green);
    transform: translateY(-2px);
}

.code-link {
    background: var(--accent-orange);
    color: var(--white);
}

.code-link:hover {
    background: #ff6b2b;
    transform: translateY(-2px);
}

/* Contact/Footer Merged Section */
.footer-contact {
    background: var(--secondary-green);
    color: var(--white);
    padding: 80px 20px 40px;
    text-align: center;
}

.footer-contact .section-title {
    color: var(--white);
    margin-bottom: 20px;
}

.contact-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-email {
    margin-bottom: 30px;
}

.email-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 12px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    transition: all 0.3s ease;
}

.email-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    transform: translateY(-2px);
}

.footer-contact .social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 40px;
}

.footer-contact .social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 1.3rem;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid transparent;
}

.footer-contact .social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    border-color: var(--white);
}

.footer-divider {
    width: 100px;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 40px auto 20px;
}

.copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin: 0;
}

/* Floating Contact Button */
.floating-contact {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-size: 1.3rem;
    position: relative;
    text-decoration: none;
}

.main-btn {
    background: var(--accent-orange);
    color: var(--white);
    z-index: 10;
}

.main-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(255, 132, 75, 0.4);
}

.main-btn .fa-times {
    display: none;
    position: absolute;
}

.main-btn.active {
    background: var(--secondary-green);
    transform: rotate(135deg);
}

.main-btn.active .fa-comment-dots {
    display: none;
}

.main-btn.active .fa-times {
    display: block;
    transform: rotate(-135deg);
}

.floating-menu {
    position: absolute;
    bottom: 70px;
    right: 5px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.floating-menu.active {
    opacity: 1;
    pointer-events: all;
}

.sub-btn {
    width: 50px;
    height: 50px;
    background: var(--white);
    color: var(--primary-blue);
    position: absolute;
    bottom: 5px;
    right: 5px;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.floating-menu.active .sub-btn {
    transform: scale(1);
}

.floating-menu.active .sub-btn:nth-child(1) {
    bottom: 80px;
    transition-delay: 0.05s;
}

.floating-menu.active .sub-btn:nth-child(2) {
    bottom: 140px;
    transition-delay: 0.1s;
}

.floating-menu.active .sub-btn:nth-child(3) {
    bottom: 200px;
    transition-delay: 0.15s;
}

.floating-menu.active .sub-btn:nth-child(4) {
    bottom: 260px;
    transition-delay: 0.2s;
}

.floating-menu.active .sub-btn:nth-child(5) {
    bottom: 320px;
    transition-delay: 0.25s;
}

.floating-menu.active .sub-btn:nth-child(6) {
    bottom: 380px;
    transition-delay: 0.3s;
}

.sub-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.github-btn:hover {
    background: #333;
    color: var(--white);
}

.linkedin-btn:hover {
    background: #0077b5;
    color: var(--white);
}

.email-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.scholar-btn:hover {
    background: var(--accent-orange);
    color: var(--white);
}

.kaggle-btn:hover {
    background: #20beff;
    color: var(--white);
}

/* Pulse animation for floating button */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(255, 132, 75, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(255, 132, 75, 0.6),
                    0 0 0 15px rgba(255, 132, 75, 0.1);
    }
    100% {
        box-shadow: 0 4px 20px rgba(255, 132, 75, 0.4),
                    0 0 0 30px rgba(255, 132, 75, 0);
    }
}

/* Telegram button specific styles */
.telegram-btn:hover {
    background: #0088cc;
    color: var(--white);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-toggle {
        display: block;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    /* Fix hero image on mobile */
    .hero-image-container {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 20px;
    }

    .hero-image {
        width: 150px;
        height: 150px;
        max-width: 100%;
        display: block !important; /* Force display on mobile */
        visibility: visible !important;
        opacity: 1 !important;
    }

    .projects-grid,
    .certificates-grid,
    .competitions-grid {
        grid-template-columns: 1fr;
    }
    
    .article-card {
        flex-direction: column;
        min-height: auto;
        padding: 30px 20px;
        text-align: center;
    }
    
    .article-image {
        width: 150px;
        height: 150px;
        margin: 0 auto 20px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .article-meta {
        flex-direction: column;
        gap: 5px;
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline-item::before {
        left: -26px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}
