/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Prevent zoom on form inputs in iOS */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fefefe;
    /* Better mobile scrolling */
    -webkit-overflow-scrolling: touch;
    /* Remove tap highlights on mobile */
    -webkit-tap-highlight-color: transparent;
    /* Prevent text selection on touch interfaces */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow text selection for content areas */
p, .hero-description, .about-text, .publication-item, .contact-item {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Allow text selection for form elements */
input, textarea, select {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

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

/* Typography */
h1, h2, h3, h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
}

h4 {
    font-size: 1.2rem;
    font-weight: 500;
}

p {
    margin-bottom: 1rem;
    color: #555;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

.btn-secondary:hover {
    background-color: #3498db;
    color: white;
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

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

.nav-logo h2 {
    margin-bottom: 0;
    color: #2c3e50;
}

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

.nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #3498db;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #555;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 150px 0 100px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.hero-content h1 {
    color: white;
    margin-bottom: 0.5rem;
}

.hero-content h2 {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.hero-description {
    max-width: 700px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* About Section */
.about {
    padding: 100px 0;
    background-color: #f8f9fa;
}

.about h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.education {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.education-item {
    margin-bottom: 1.5rem;
}

.education-item h4 {
    margin-bottom: 0.5rem;
    color: #3498db;
}

.education-item p {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: #666;
}

/* Research Section */
.research {
    padding: 100px 0;
}

.research h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.research-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    /* Better touch feedback */
    -webkit-tap-highlight-color: rgba(52, 152, 219, 0.2);
}

.research-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.research-card:active {
    transform: translateY(-2px);
}

.research-card h3 {
    color: #3498db;
    margin-bottom: 1rem;
}

.experience {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
}

.experience-item {
    margin-bottom: 2rem;
}

.experience-item h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.experience-item p {
    margin-bottom: 0.5rem;
}

/* Publications Section */
.publications {
    padding: 100px 0;
    background-color: #f8f9fa;
}

.publications h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.publications-section {
    margin-bottom: 3rem;
}

.publications-section h3 {
    margin-bottom: 2rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.publication-item {
    background: white;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    /* Better touch feedback */
    -webkit-tap-highlight-color: rgba(52, 152, 219, 0.2);
}

.publication-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.publication-item h4 {
    color: #3498db;
    margin-bottom: 0.5rem;
}

/* Contact Section */
.contact {
    padding: 100px 0;
}

.contact h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info-single {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.contact-item {
    margin-bottom: 2rem;
}

.contact-item h3 {
    margin-bottom: 0.5rem;
    color: #3498db;
}

.contact-item a {
    color: #555;
    text-decoration: none;
}

.contact-item a:hover {
    color: #3498db;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* CV Specific Styles */
.cv-hero {
    padding: 130px 0 80px 0;
}

.cv-content {
    padding: 60px 0;
}

.cv-section {
    margin-bottom: 4rem;
}

.cv-section h2 {
    border-bottom: 3px solid #3498db;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.cv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.cv-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.cv-item h4 {
    margin-bottom: 0.5rem;
    color: #3498db;
}

.cv-timeline {
    position: relative;
    padding-left: 2rem;
}

.cv-timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #3498db;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.timeline-marker {
    position: absolute;
    left: -2.5rem;
    top: 1.5rem;
    width: 1rem;
    height: 1rem;
    background: #3498db;
    border-radius: 50%;
    border: 3px solid white;
}

.timeline-content h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.timeline-content .institution {
    font-weight: 600;
    color: #3498db;
    margin-bottom: 0.25rem;
}

.timeline-content .period {
    font-style: italic;
    color: #666;
    margin-bottom: 0.5rem;
}

.timeline-content .description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 0;
}

.research-interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.research-interest-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-top: 3px solid #3498db;
}

.research-interest-item h4 {
    margin-bottom: 0.75rem;
    color: #3498db;
}

.cv-publications {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
}

.publication-category {
    margin-bottom: 2rem;
}

.publication-category:last-child {
    margin-bottom: 0;
}

.publication-category h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

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

.skill-category {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.skill-category h4 {
    margin-bottom: 1rem;
    color: #3498db;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

.skill-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skill-category li {
    padding: 0.5rem 0;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 1rem;
}

.skill-category li:last-child {
    border-bottom: none;
}

.skill-category li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #3498db;
    font-weight: bold;
}

.cv-download-section {
    text-align: center;
    margin-top: 3rem;
}

.download-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.download-card h3 {
    color: white;
    margin-bottom: 1rem;
}

.download-card p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Download button with icon */
.btn svg {
    margin-right: 0.5rem;
    vertical-align: -2px;
}

/* Document/File Download Styles */
.file-download-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3498db;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.file-download-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.file-info {
    flex-grow: 1;
}

.file-info h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.file-info p {
    margin-bottom: 0;
    color: #666;
    font-size: 0.9rem;
}

.file-meta {
    color: #999;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.file-actions {
    margin-left: 1rem;
}

.btn-download {
    background-color: #27ae60;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-download:hover {
    background-color: #229954;
    transform: translateY(-1px);
    color: white;
}

/* Documents section */
.documents-section {
    margin-top: 2rem;
}

.documents-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    /* Enhanced Mobile Navigation */
    .hamburger {
        display: flex !important;
        padding: 12px;
        border-radius: 4px;
        transition: background-color 0.3s ease;
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
        align-items: center;
    }
    
    .nav-menu {
        display: none;
    }
    
    .nav-container {
        padding: 1rem 15px;
    }
    
    .hamburger:hover {
        background-color: rgba(52, 152, 219, 0.1);
    }
    
    .hamburger:active {
        transform: scale(0.95);
    }

    .bar {
        border-radius: 2px;
    }

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

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: left 0.4s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: 80px 0 2rem 0;
        z-index: 999;
        overflow-y: auto;
        display: flex;
        justify-content: center;
        align-items: flex-start;
    }

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

    .nav-menu .nav-item {
        margin: 1.5rem 0;
        width: 100%;
    }
    
    .nav-link {
        display: block;
        padding: 1.5rem 2rem;
        font-size: 1.2rem;
        border-radius: 8px;
        margin: 0 1rem;
        transition: all 0.3s ease;
        color: #333;
        text-decoration: none;
        font-weight: 500;
        width: calc(100% - 2rem);
        text-align: center;
    }

    .nav-link:hover, .nav-link:active {
        background-color: rgba(52, 152, 219, 0.1);
        color: #3498db;
        transform: none;
    }

    /* Enhanced Typography for Mobile */
    .nav-logo h2 {
        font-size: 1.2rem;
    }

    h1 {
        font-size: 2.2rem;
        line-height: 1.3;
    }

    h2 {
        font-size: 1.8rem;
        line-height: 1.4;
    }

    h3 {
        font-size: 1.3rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    p {
        font-size: 1rem;
        line-height: 1.7;
    }

    /* Better Button Touch Targets */
    .btn {
        padding: 16px 32px;
        font-size: 1rem;
        min-height: 48px;
        min-width: 120px;
        border-radius: 8px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .hero-buttons .btn {
        width: 200px;
        text-align: center;
    }

    /* Enhanced Grid Layouts */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .research-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-info-single {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 100%;
    }

    /* Mobile-Optimized Cards */
    .research-card, .publication-item, .education {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    /* CV Mobile Optimizations */
    .cv-timeline {
        padding-left: 1rem;
    }

    .cv-timeline::before {
        left: 0.5rem;
    }

    .timeline-marker {
        left: -0.25rem;
        width: 0.75rem;
        height: 0.75rem;
    }

    .timeline-item {
        margin-left: 1rem;
    }

    .cv-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .research-interests-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .download-card {
        padding: 2rem 1.5rem;
    }

    .file-download-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .file-actions {
        margin-left: 0;
    }

    /* Better Mobile Spacing */
    .container {
        padding: 0 20px;
    }

    .hero {
        padding: 120px 0 80px 0;
    }

    .about, .research, .publications, .contact {
        padding: 60px 0;
    }

    /* Mobile Form Improvements */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 16px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 8px;
        min-height: 48px;
    }

    .form-group textarea {
        min-height: 120px;
    }

    /* Touch-friendly contact items */
    .contact-item a {
        display: inline-block;
        padding: 8px 12px;
        margin: 4px 0;
        border-radius: 6px;
        transition: background-color 0.3s ease;
    }

    .contact-item a:hover {
        background-color: rgba(52, 152, 219, 0.1);
    }
}

@media (max-width: 480px) {
    /* Extra Small Mobile Optimizations */
    .nav-logo h2 {
        font-size: 1rem;
    }

    h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    .hero {
        padding: 100px 0 60px 0;
    }

    .hero-description {
        font-size: 1rem;
        max-width: 100%;
        padding: 0 10px;
    }

    .about, .research, .publications, .contact {
        padding: 50px 0;
    }

    .container {
        padding: 0 15px;
    }

    /* Tighter spacing for small screens */
    .research-card, .publication-item, .education {
        padding: 1rem;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }

    /* Better text readability on small screens */
    p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Improved form layout */
    .form-group {
        margin-bottom: 1rem;
    }

    .contact-item {
        text-align: center;
        margin-bottom: 1.5rem;
    }
}

/* Add medium tablet breakpoint */
@media (max-width: 992px) and (min-width: 769px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .research-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    h1 {
        font-size: 2.8rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
}

/* Add landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 80px 0 60px 0;
    }
    
    .nav-menu {
        height: 100vh;
        padding: 60px 0 1rem 0;
        justify-content: flex-start;
    }
    
    .nav-menu .nav-item {
        margin: 0.8rem 0;
    }
    
    .nav-link {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }
}

/* Force hamburger visibility on all mobile devices */
@media (max-width: 768px) {
    .hamburger {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .nav-menu {
        display: none !important;
    }
    
    .nav-menu.active {
        display: flex !important;
    }
}

/* Additional mobile fixes */
@media (max-width: 480px) {
    .nav-container {
        padding: 0.8rem 15px;
    }
    
    .nav-logo h2 {
        font-size: 1rem;
    }
    
    .hamburger {
        min-width: 48px;
        min-height: 48px;
    }
}
