/* ==========================================================================
   CSS Reset & Base Styles
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #ffffff;
    overflow-x: hidden;
}

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

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: #555;
    margin-bottom: 2rem;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

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

.nav-brand a {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.nav-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #3498db;
    transition: width 0.3s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #2c3e50;
    transition: all 0.3s ease;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}

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

.hero-social {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.hero-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

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

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-indicator a {
    color: white;
    font-size: 2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: #2980b9;
    border-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

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

.btn-full {
    width: 100%;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
    padding: 5rem 0;
}

.section:nth-child(even) {
    background: #f8f9fa;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: #2c3e50;
    margin-bottom: 1rem;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #9b59b6);
    margin: 0 auto 1rem;
    border-radius: 2px;
}

.section-description {
    max-width: 700px;
    margin: 0 auto;
    color: #666;
    font-size: 1.1rem;
}

/* ==========================================================================
   About Section
   ========================================================================== */

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-info h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.about-info p {
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detail-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.detail-item i {
    font-size: 1.5rem;
    color: #3498db;
    margin-top: 0.25rem;
}

.detail-item strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.detail-item p {
    color: #666;
    margin: 0;
}

/* ==========================================================================
   Experience Section
   ========================================================================== */

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

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #3498db, #9b59b6);
}

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

.timeline-marker {
    position: absolute;
    left: 10px;
    top: 5px;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: #3498db;
    border: 4px solid white;
    box-shadow: 0 0 0 4px #e3f2fd;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.timeline-date {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-date i {
    margin-right: 0.5rem;
}

.timeline-content h3 {
    color: #2c3e50;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: #3498db;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.timeline-content .location {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.timeline-content .location i {
    margin-right: 0.5rem;
    color: #3498db;
}

.experience-details h5 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.experience-details ul {
    list-style: none;
    padding: 0;
}

.experience-details li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: #555;
    line-height: 1.6;
}

.experience-details li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: #3498db;
    font-weight: bold;
}

/* ==========================================================================
   Education Section
   ========================================================================== */

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

.education-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.education-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

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

.education-card p {
    color: #666;
    line-height: 1.7;
}

/* ==========================================================================
   Publications Section
   ========================================================================== */

.publications-content {
    max-width: 900px;
    margin: 0 auto;
}

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

.research-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

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

.research-card i {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 1rem;
}

.research-card h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.research-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==========================================================================
   Skills Section
   ========================================================================== */

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

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.skill-category h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skill-category h3 i {
    color: #3498db;
    font-size: 1.5rem;
}

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

.skill-category li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: #555;
    line-height: 1.6;
}

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

/* ==========================================================================
   Contact Section
   ========================================================================== */

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

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.contact-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.contact-card h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.contact-card p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.contact-card a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-card a:hover {
    color: #2980b9;
}

/* Contact Form */

.contact-form-wrapper {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    padding: 0.875rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

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

.form-message {
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1.5rem;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #3498db;
}

.footer-section i {
    margin-right: 0.5rem;
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* ==========================================================================
   Scroll to Top Button
   ========================================================================== */

.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top.visible {
    display: flex;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   Animations
   ========================================================================== */

[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

[data-animate="fadeInLeft"] {
    transform: translateX(-30px);
}

[data-animate="fadeInRight"] {
    transform: translateX(30px);
}

[data-animate="fadeInLeft"].animated,
[data-animate="fadeInRight"].animated {
    transform: translateX(0);
}

/* Typewriter Effect */
.typewriter {
    display: inline-block;
    border-right: 3px solid white;
    padding-right: 5px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 49% {
        border-color: white;
    }
    50%, 100% {
        border-color: transparent;
    }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 1rem;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        flex-direction: column;
        background: white;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        padding: 2rem;
        gap: 1rem;
        transition: left 0.3s ease;
    }

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

    .nav-toggle {
        display: flex;
    }

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

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

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

    .section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-item {
        padding-left: 40px;
    }

    .timeline-marker {
        left: 0;
    }

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

    .contact-info {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .scroll-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .about-details,
    .education-grid,
    .research-areas,
    .skills-grid {
        grid-template-columns: 1fr;
    }
}
