/* Homepage Styles */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #64748b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --border-radius-lg: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

body.menu-open {
    overflow: hidden;
}

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

/* Header */
.navbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar.navbar-hidden {
    transform: translateY(-100%);
}

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

.nav-logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

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

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 30px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Typing Effect */
.typing-text::after {
    content: '|';
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

/* Projects Section */
.projects {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.projects h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 60px;
    color: var(--text-primary);
}

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

.project-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

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

.project-card.featured {
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.project-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius);
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.project-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

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

.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.feature {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.wip {
    color: #e11d48;
    font-weight: 500;
    font-size: 0.9em;
    display: inline-block;
    margin-top: 8px;
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--bg-primary);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 18px;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.stat h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.stat p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-5px);
}

/* Notification System */
.notification {
    position: fixed;
    top: 90px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary-color);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    z-index: 1001;
    max-width: 400px;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    border-left-color: #10b981;
}

.notification-error {
    border-left-color: #ef4444;
}

.notification-info {
    border-left-color: var(--primary-color);
}

/* Lazy Loading Images */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.lazy.loaded {
    opacity: 1;
}

/* Animate on Scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
footer {
    background: var(--text-primary);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-section p {
    color: #cbd5e1;
    line-height: 1.6;
}

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

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

#contact a[href^="mailto:"] {
    color: var(--text-secondary);
    text-decoration: underline;
    font-weight: 500;
}

#contact a[href^="mailto:"]:hover {
    color: var(--primary-color);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    color: #cbd5e1;
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #475569;
    padding-top: 20px;
    text-align: center;
    color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
    }

    /* Mobile Menu */
    .mobile-menu-btn {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu li {
        padding: 12px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a.active::after {
        display: none;
    }

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

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 18px;
    }

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

    .projects {
        padding: 60px 0;
    }

    .projects h2 {
        font-size: 28px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .project-card {
        padding: 24px;
    }

    .about {
        padding: 60px 0;
    }

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

    .about-text h2 {
        font-size: 28px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .notification {
        top: 80px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .projects h2 {
        font-size: 24px;
    }

    .project-card {
        padding: 20px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .scroll-to-top {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* ===== RESEARCH PAGE STYLES ===== */

.research-hero {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    padding: 100px 0 60px;
    text-align: center;
}

.research-hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
}

.research-hero p {
    font-size: 20px;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

.tabs-container {
    background: var(--bg-secondary);
    padding: 40px 0;
    position: sticky;
    top: 70px;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: all 0.2s;
    font-size: 16px;
}

.tab-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.tab-content {
    display: none;
    padding: 60px 0;
    min-height: 400px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Research Projects */
.research-grid {
    display: grid;
    gap: 32px;
}

.research-item {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.research-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.research-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 16px;
    gap: 16px;
    flex-wrap: wrap;
}

.research-title h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.research-meta {
    color: var(--text-secondary);
    font-size: 14px;
}

.research-status {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-ongoing {
    background: #dbeafe;
    color: #1e40af;
}

.status-published {
    background: #fce7f3;
    color: #9f1239;
}

.research-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.research-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.research-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Coursework */
.coursework-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.course-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.course-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.course-header {
    margin-bottom: 16px;
}

.course-code {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.course-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.course-semester {
    color: var(--text-muted);
    font-size: 14px;
}

.course-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 14px;
}

.course-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.course-topics .tag {
    font-size: 12px;
}

/* Category Sections */
.category-section {
    margin-bottom: 60px;
}

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

.category-header {
    margin-bottom: 32px;
}

.category-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.category-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Publications */
.publication-item {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
    transition: all 0.3s;
}

.publication-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.publication-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.publication-authors {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 15px;
}

.publication-venue {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 16px;
    font-size: 14px;
}

.publication-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* Research Page Responsive */
@media (max-width: 768px) {
    .research-hero {
        padding: 80px 0 40px;
    }

    .research-hero h1 {
        font-size: 32px;
    }

    .research-hero p {
        font-size: 18px;
    }

    .tabs {
        gap: 4px;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .tab-content {
        padding: 40px 0;
    }

    .coursework-grid {
        grid-template-columns: 1fr;
    }

    .research-header {
        flex-direction: column;
        align-items: start;
    }
}