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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Header with animated background */
.header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.profile-container {
    position: relative;
    z-index: 2;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 5px solid white;
    margin: 0 auto 2rem;
    display: block;
    object-fit: cover;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05) rotate(2deg);
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: slideInUp 1s ease 0.5s forwards;
}

.header .subtitle {
    font-size: 1.4rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    opacity: 0;
    animation: slideInUp 1s ease 0.8s forwards;
}

.header .institution {
    font-size: 1.1rem;
    opacity: 0.8;
    opacity: 0;
    animation: slideInUp 1s ease 1.1s forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    opacity: 0;
    animation: slideInUp 1s ease 1.4s forwards;
}

.social-links a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 25px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-links a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-3px);
}

/* Navigation */
.navigation {
    position: sticky;
    top: 0;
    background: rgba(52, 73, 94, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    z-index: 1000;
    border-bottom: 2px solid #3498db;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    background: #3498db;
    transform: translateY(-2px);
}

/* Main Content */
.main-content {
    padding: 0 2rem;
}

.section {
    padding: 4rem 0;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #3498db, #2980b9);
    border-radius: 2px;
}

/* Education Cards */
.education-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.education-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2rem;
    border-radius: 15px;
    border-left: 5px solid #3498db;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.education-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52,152,219,0.1), transparent);
    transition: left 0.5s ease;
}

.education-card:hover::before {
    left: 100%;
}

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

.education-card h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.education-card .year {
    color: #3498db;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.education-card .institution {
    color: #666;
    font-style: italic;
    margin-bottom: 0.5rem;
}

/* Publications */
.publications-container {
    margin-top: 2rem;
}

.publication-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: #ecf0f1;
    border: 2px solid #bdc3c7;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.publication-item {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInLeft 0.5s ease forwards;
}

.publication-item:nth-child(even) {
    border-left-color: #e74c3c;
    animation-delay: 0.1s;
}

.publication-item:nth-child(odd) {
    animation-delay: 0.2s;
}

.publication-item:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.publication-item h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.publication-item .journal {
    color: #3498db;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.publication-item .authors {
    color: #666;
    font-style: italic;
    margin-bottom: 0.5rem;
}

/* Abstract styles */
.abstract-container {
    margin-top: 1rem;
    border-top: 1px solid #e0e0e0;
    padding-top: 1rem;
}

.abstract-toggle {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.abstract-toggle:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.abstract-text {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    text-align: justify;
    line-height: 1.8;
    color: #555;
    margin-top: 1rem;
}

.abstract-text.show {
    max-height: 600px;
    overflow-y: auto;
}

/* Book Cover Styles */
.publication-item[data-type="book"] {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.book-cover-container {
    flex-shrink: 0;
}

.book-cover-image {
    width: 180px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    object-fit: cover;
    cursor: pointer;
}

.book-cover-image:hover {
    transform: scale(1.05) rotate(-2deg);
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

.book-details {
    flex: 1;
    min-width: 0;
}

.publication-item[data-type="book"] .abstract-container {
    flex: 1;
    min-width: 0;
}

/* Image Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.image-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: -40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .modal-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }

    .modal-content-wrapper {
        max-width: 95%;
    }
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.skill-category {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-category:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.skill-category h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.skill-category .skills-list {
    color: #666;
    line-height: 1.8;
}

/* Contact Section */
.contact-info {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 3rem;
    border-radius: 20px;
    margin-top: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-info::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.contact-details {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
}

.contact-item {
    text-align: center;
}

.contact-item strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(52, 152, 219, 0.3);
    z-index: 9999;
}

.scroll-progress {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    width: 0%;
    transition: width 0.1s ease;
}

/* Responsive Design */

/* Tablet and below (768px and below) */
@media (max-width: 768px) {
    /* Navigation */
    .hamburger {
        display: flex;
    }

    .navigation {
        padding: 1rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(52, 73, 94, 0.98);
        padding: 1rem;
        gap: 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 1rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
        text-align: center;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    /* Header */
    .header {
        padding: 3rem 1rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .header .subtitle {
        font-size: 1.1rem;
    }

    .header .institution {
        font-size: 0.9rem;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    .social-links {
        flex-direction: column;
        gap: 0.8rem;
    }

    .social-links a {
        font-size: 1rem;
        width: 100%;
        max-width: 280px;
    }

    /* Main Content */
    .main-content {
        padding: 0 1rem;
    }

    .section {
        padding: 2rem 0;
    }

    .section h2 {
        font-size: 1.8rem;
    }

    /* Skills Grid */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .skill-category {
        padding: 1.5rem;
    }

    /* Publication Filters */
    .publication-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    /* Publication Items */
    .publication-item {
        padding: 1.2rem;
    }

    .publication-item h4 {
        font-size: 1rem;
    }

    /* Book Cover Responsive */
    .publication-item[data-type="book"] {
        flex-direction: column;
        gap: 1rem;
    }

    .book-cover-container {
        text-align: center;
    }

    .book-cover-image {
        width: 120px;
    }

    .abstract-text.show {
        max-height: 400px;
        overflow-y: auto;
    }

    /* Education Cards */
    .education-card {
        padding: 1.5rem;
    }

    .education-card h3 {
        font-size: 1.2rem;
    }

    /* Contact */
    .contact-details {
        flex-direction: column;
        gap: 1.5rem;
    }

    .contact-info {
        padding: 2rem 1.5rem;
    }

    /* Footer */
    .footer {
        padding: 1.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    /* Header */
    .header {
        padding: 2rem 0.8rem;
    }

    .header h1 {
        font-size: 1.6rem;
    }

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

    .header .institution {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .profile-image {
        width: 120px;
        height: 120px;
        margin-bottom: 1.5rem;
    }

    .social-links {
        gap: 0.6rem;
    }

    .social-links a {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }

    /* Main Content */
    .main-content {
        padding: 0 0.8rem;
    }

    .section {
        padding: 1.5rem 0;
    }

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

    .section h2::after {
        width: 60px;
        height: 3px;
    }

    /* Education Cards */
    .education-card {
        padding: 1.2rem;
    }

    .education-card h3 {
        font-size: 1.1rem;
    }

    .education-card .year {
        font-size: 1rem;
    }

    /* Skills */
    .skill-category {
        padding: 1.2rem;
    }

    .skill-category h3 {
        font-size: 1.1rem;
    }

    /* Publications */
    .publication-filters {
        gap: 0.4rem;
    }

    .filter-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .publication-item {
        padding: 1rem;
    }

    .publication-item h4 {
        font-size: 0.95rem;
    }

    .publication-item .journal {
        font-size: 0.85rem;
    }

    .publication-item .authors {
        font-size: 0.85rem;
    }

    .abstract-toggle {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .abstract-text.show {
        max-height: 300px;
        overflow-y: auto;
        font-size: 0.9rem;
    }

    /* Book Cover Responsive for Small Mobile */
    .book-cover-image {
        width: 100px;
    }

    /* Contact */
    .contact-info {
        padding: 1.5rem 1rem;
    }

    .contact-info h3 {
        font-size: 1.5rem;
    }

    .contact-item {
        font-size: 0.9rem;
    }
}

/* Small tablets (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header h1 {
        font-size: 2.3rem;
    }

    .profile-image {
        width: 160px;
        height: 160px;
    }
}

/* Larger tablets and small desktops (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 100%;
    }

    .header h1 {
        font-size: 2.8rem;
    }

    .profile-image {
        width: 180px;
        height: 180px;
    }

    .main-content {
        padding: 0 1.5rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-links a,
    .filter-btn,
    .abstract-toggle,
    .social-links a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .filter-btn {
        padding: 0.8rem 1.2rem;
    }
}
