:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-gray: #f5f7fa;
    --dark-gray: #7f8c8d;
    --transition-speed: 0.3s;
    --border-radius: 12px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--secondary-color);
    line-height: 1.8;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem;
    flex: 1;
    transition: all var(--transition-speed) ease;
}

header {
    text-align: center;
    margin: 0 auto 2rem;
    padding: 3rem 1rem 2rem;
    border-bottom: none;
    position: relative;
    max-width: 800px;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    color: var(--secondary-color);
    margin-bottom: 0.8rem;
    font-weight: 700;
    line-height: 1.3;
    display: inline-block;
}

h1 .gradient-text {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitle {
    color: var(--dark-gray);
    font-weight: 400;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    font-style: italic;
}

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: 0 auto 2.5rem;
    position: relative;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

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

#searchInput {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3rem;
    font-size: 1rem;
    border: 2px solid #e0e6ed;
    border-radius: 50px;
    outline: none;
    transition: all var(--transition-speed) ease;
    font-family: 'Poppins', sans-serif;
    box-shadow: var(--box-shadow);
}

#searchInput:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dark-gray);
    pointer-events: none;
}

/* Navigation Menu */
nav {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    padding: 0.8rem 0;
    border-bottom: 3px solid var(--primary-color);
}

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

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    padding: 0.5rem 0;
}

.logo img {
    height: 48px;
    margin-right: 12px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-main {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-sub {
    font-size: 0.8rem;
    color: var(--dark-gray);
    font-weight: 400;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

nav ul li a {
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav ul li a i {
    font-size: 1.1em;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
    background-color: rgba(74, 144, 226, 0.1);
    transform: translateY(-1px);
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
    padding: 0.5rem;
    margin-right: -0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.menu-toggle:hover {
    background-color: rgba(74, 144, 226, 0.1);
}

/* Main Content */
main {
    animation: fadeIn 0.8s ease-out 0.4s both;
    padding: 0 1.5rem;
}

/* Subjects Grid */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

@media (max-width: 1200px) {
    .subjects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .subjects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .subjects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .subjects-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
}

.subject-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    height: 280px;
    min-height: 280px;
    max-height: 280px;
    position: relative;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.subject-card:hover .subject-card-arrow {
    transform: translateX(3px);
}

.subject-card:hover .subject-card-icon {
    transform: scale(1.1);
}

.subject-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    text-decoration: none;
    color: inherit;
    padding: 1.5rem;
    position: relative;
}

.subject-card-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.subject-card h3 {
    margin: 0 0 0.75rem;
    color: var(--secondary-color);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3em;
    max-height: 3em;
}

.subject-card p {
    color: var(--dark-gray);
    margin: 0 0 1rem;
    flex-grow: 1;
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 6em;
    max-height: 6em;
    padding: 0;
}

.subject-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.subject-card-count {
    font-size: 0.85rem;
    color: var(--primary-color);
    background: rgba(74, 144, 226, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 500;
}

.subject-card-arrow {
    color: var(--primary-color);
    transition: transform 0.3s ease;
    background: rgba(74, 144, 226, 0.1);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.subject-card:hover .subject-card-arrow {
    transform: translateX(3px);
}

.subject-card:hover .subject-card-icon {
    transform: scale(1.1);
}

.subject-header {
    padding: 1.5rem 2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--secondary-color);
    background: white;
    border: none;
    width: 100%;
    text-align: left;
    transition: all var(--transition-speed) ease;
    position: relative;
    z-index: 1;
}

.subject-header:hover, .subject-header:focus {
    color: var(--primary-color);
    outline: none;
}

.subject-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(74, 144, 226, 0.1), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: -1;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.subject-header:hover::after, .subject-header:focus::after {
    transform: scaleX(1);
}

.toggle-icon {
    transition: transform var(--transition-speed) ease;
    color: var(--dark-gray);
    font-size: 0.9em;
    margin-left: 1rem;
}

.presentation-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.presentation-list.show {
    max-height: 2000px;
}

.presentation-item {
    padding: 0.8rem 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s;
}

.presentation-item:hover {
    background-color: rgba(74, 144, 226, 0.05);
}

.presentation-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: var(--secondary-color);
    padding: 0.8rem 0;
    position: relative;
    transition: all var(--transition-speed) ease;
}

.presentation-link::before {
    content: '→';
    position: absolute;
    left: -1.2rem;
    color: var(--primary-color);
    opacity: 0;
    transform: translateX(-5px);
    transition: all var(--transition-speed) ease;
}

.presentation-link:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.presentation-link:hover .presentation-title {
    color: var(--primary-color);
    transform: translateX(8px);
}

.presentation-title {
    flex: 1;
    transition: transform 0.3s ease, color 0.3s ease;
    font-weight: 500;
    position: relative;
    padding-left: 0.5rem;
}

.presentation-date {
    color: var(--dark-gray);
    font-size: 0.85rem;
    margin-left: 1rem;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.04);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    transition: all var(--transition-speed) ease;
}

.presentation-link:hover .presentation-date {
    background: var(--primary-color);
    color: white;
}

/* Empty state */
.empty-message {
    padding: 2rem;
    text-align: center;
    color: var(--dark-gray);
    font-style: italic;
}

@media (max-width: 1024px) {
    nav ul li a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .profile-header {
        flex-direction: column;
    }
}
        
@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }
    
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
        border-radius: 0 0 8px 8px;
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav ul li {
        width: 100%;
        margin: 0;
    }
    
    nav ul li a {
        padding: 0.8rem 2rem;
        border-radius: 0;
        display: flex;
        justify-content: flex-start;
    }
    
    nav ul li a:hover {
        background-color: rgba(74, 144, 226, 0.1);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .subjects-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
    
    .subject-card {
        aspect-ratio: 1.1;
    }
    
    .subject-card h3 {
        font-size: 1.2rem;
    }
    
    .subject-card p {
        font-size: 0.85rem;
    }
    
    .subject-card-icon {
        font-size: 2.2rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        z-index: 1000;
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav ul li {
        margin: 0;
        padding: 0;
    }
    
    nav ul li a {
        padding: 0.8rem 1.5rem;
        display: flex;
        align-items: center;
        border-radius: 0;
    }
    
    nav ul li a i {
        width: 24px;
        text-align: center;
    }
    
    .profile-photo {
        width: 120px;
        height: 120px;
    }
    
    .profile-info h1 {
        font-size: 1.6rem;
    }
}

/* Research Section */
.research-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.research-interests, .publications {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
}

.research-interests h3, .publications h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.interests-list {
    list-style: none;
    padding: 0;
}

.interests-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--secondary-color);
}

.interests-list i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

.publication-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.publication-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.publication-item h4 {
    margin: 0 0 0.25rem;
    color: var(--secondary-color);
}

.publication-journal {
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin: 0;
}

/* Contact Section */
.contact-container {
    max-width: 1000px;
    margin: 0 auto;
}

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

.contact-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

/* Profile Header */
.profile-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    text-align: left;
}

.profile-info {
    max-width: 500px;
}

/* Profile Picture */
.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin: 0 auto 1.5rem;
    display: block;
}

/* Footer */
.site-footer {
    background-color: var(--secondary-color);
    color: var(--light-gray);
    padding: 3rem 0 0;
    margin-top: 4rem;
    font-size: 0.95rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
}

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

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

.footer-section ul li a {
    color: var(--light-gray);
    text-decoration: none;
    transition: color var(--transition-speed);
}

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

.social-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-links a {
    color: var(--light-gray);
    font-size: 1.4rem;
    transition: color var(--transition-speed), transform var(--transition-speed);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.newsletter p {
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 0.8rem;
    border: 1px solid var(--dark-gray);
    border-radius: 4px 0 0 4px;
    background: #3a4c5e;
    color: white;
    outline: none;
}

.btn-subscribe {
    padding: 0.8rem 1.2rem;
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    transition: background-color var(--transition-speed);
}

.btn-subscribe:hover {
    background: #3a7ac8;
}

.footer-bottom {
    border-top: 1px solid #3a4c5e;
    margin-top: 2rem;
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom .footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-legal a {
    color: var(--light-gray);
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color var(--transition-speed);
}

.footer-legal a:hover {
    color: var(--primary-color);
}

/* Detailed Presentation List for Subject Pages */
.presentation-list-detailed {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.presentation-item-detailed {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem 2rem;
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.presentation-item-detailed:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

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

.presentation-info h4 {
    margin: 0 0 0.5rem;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.presentation-description {
    color: var(--dark-gray);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.presentation-date {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
}

.presentation-links {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.btn-view, .btn-download {
    text-decoration: none;
    color: white;
    background: var(--primary-color);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
}

.btn-download {
    background: var(--secondary-color);
}

.btn-view:hover, .btn-download:hover {
    transform: translateY(-2px);
}

.btn-view:hover {
    background: #3a7ac8;
}

.btn-download:hover {
    background: #1e2a38;
}