:root {
    --primary-blue: #003366;
    /* Professional Blue */
    --medical-white: #F8FDFF;
    /* Medical White - very subtle blue tint for sterility */
    --accent-blue: #0056b3;
    --text-dark: #1a1a1a;
    --text-light: #f0f0f0;
    --transition-speed: 0.3s;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--medical-white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-blue);
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 51, 102, 0.1);
    transition: all var(--transition-speed) ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

/* Loading Spinner */
.loading-container {
    padding: 3rem;
    text-align: center;
    width: 100%;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 51, 102, 0.1);
    border-left-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: 600;
    transition: color var(--transition-speed);
}

.nav-links a:hover {
    color: var(--accent-blue);
}

/* Hero Section */
.hero {
    min-height: calc(100vh - 80px);
    /* Adjust height calculation */
    display: flex;
    align-items: center;
    /* padding-top removed as main handles it */
    background: linear-gradient(135deg, var(--medical-white) 0%, #e6f7ff 100%);
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.hero-text {
    flex: 1;
    padding-right: 2rem;
}

.hero-text h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    opacity: 0.8;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-image img {
    width: 350px;
    height: 350px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--primary-blue);
    box-shadow: 0 20px 40px rgba(0, 51, 102, 0.2);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.btn {
    display: inline-block;
    background-color: var(--primary-blue);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 51, 102, 0.3);
}

/* About Section */
.section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-blue);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Portfolio Section */
.portfolio {
    background-color: #f0f8ff;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-speed);
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    margin-bottom: 0.5rem;
}

/* Contact Section */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-blue);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color var(--transition-speed);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
}

footer {
    background-color: var(--primary-blue);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
    /* Push footer to bottom */
}

main {
    flex: 1;
    /* Allow main to grow and fill available space */
    padding-top: 80px;
    /* Account for fixed header */
    width: 100%;
}

/* Articles */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-dark);
    opacity: 0.7;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    border: 1px dashed rgba(0, 51, 102, 0.2);
    font-size: 1.1rem;
    font-weight: 500;
}

.article-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-speed);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.article-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.article-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    display: block;
}

.article-abstract {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Article View */
/* Article View */
.article-view {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    padding: 3rem 4rem;
    border-radius: 4px;
    box-shadow: 0 4px 25px rgba(0, 51, 102, 0.08);
    /* Subtle blue-tinted shadow */
}

.article-header {
    margin-bottom: 4rem;
    text-align: left;
    border-bottom: none;
    padding-bottom: 0;
    position: relative;
    background: linear-gradient(to right, #f0f8ff, transparent);
    padding: 3rem 2rem;
    border-radius: 8px;
    border-left: 6px solid var(--primary-blue);
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    color: var(--primary-blue);
    font-weight: 800;
    /* Extra bold for impact */
}

.article-header .article-meta {
    font-size: 1rem;
    color: #555;
    background: transparent;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1.5rem;
}

.article-header .article-meta p {
    margin: 0;
}

.article-header .article-meta strong {
    color: var(--primary-blue);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    margin-right: 0.5rem;
}

.article-section {
    margin-bottom: 3rem;
}

.article-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
    /* Underline style instead of side border */
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.article-section p {
    margin-bottom: 1.5rem;
    text-align: left;
    /* Justify can cause weird spacing, left is safer for web */
    font-size: 1.125rem;
    /* 18px for better readability */
    line-height: 1.8;
    /* Relaxed line height */
    color: #333;
}

.reference-list {
    list-style-type: decimal;
    padding-left: 1.5rem;
    border-top: 1px solid #f0f0f0;
    padding-top: 2rem;
}

.reference-list li {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

/* Hamburger Menu default styles */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-blue);
    transition: all 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
        /* Reduce side padding on mobile */
    }

    .section {
        padding: 4rem 0;
        /* Reduce vertical spacing */
    }

    .hero {
        min-height: auto;
        padding: 6rem 0 4rem;
        /* Add top padding for fixed header clearance */
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .hero-text {
        padding-right: 0;
        margin-top: 1rem;
    }

    .hero-text h1 {
        font-size: 2.25rem;
        margin-bottom: 1rem;
    }

    .hero-text p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .hero-image {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .hero-image img {
        width: 250px;
        /* Smaller image on mobile */
        height: 250px;
        max-width: 80%;
        /* Prevent overflow */
        border-width: 4px;
        box-shadow: 0 10px 25px rgba(0, 51, 102, 0.15);
        /* Softer shadow */
    }

    /* Mobile Navigation */
    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 80%;
        /* Wider menu for easier access */
        max-width: 300px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        /* Stronger blur */
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        /* Smoother interaction */
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1.25rem 0;
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        font-size: 1.25rem;
        /* Larger touch targets */
        display: block;
        padding: 0.5rem;
    }

    /* Hamburger Animation when Active */
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .article-view {
        padding: 1.5rem 1rem;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }

    .hero-image img {
        width: 200px;
        height: 200px;
    }
}