@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.8;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f4f4f9;
    transition: background-color 0.3s ease;
}

.header {
    text-align: center;
    margin: 40px 0;
}

.logo-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.logo {
    max-width: 200px;
    height: auto;
}

.header h1 {
    font-size: 2.5em;
    margin: 0;
    flex-grow: 1;
    text-align: center;
}

.header p {
    font-size: 1.2em;
    color: #555;
}

.project {
    margin-bottom: 3rem;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.project h1 {
    font-size: 1.5em;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.authors, .affiliations {
    font-size: 1em;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.authors {
    color: #0066cc;
}

.affiliations {
    color: #666;
}

.publication-info {
    font-size: 0.9em;
    color: #4a4a4a;
    font-style: italic;
    margin-bottom: 1rem;
}

.links {
    margin: 1rem 0;
    text-align: center;
}

.button {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    margin-right: 0.5rem;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9em;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background-color: #555;
    transform: scale(1.05);
}

.project-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1rem;
}

.abstract, .architecture {
    flex: 1 1 45%;
    position: relative;
}

.abstract {
    position: relative;
    padding: 20px;
}

.abstract-content {
    overflow: hidden;
    max-height: 100px; /* Adjust this value based on how many lines you want to show initially */
    transition: max-height 0.3s ease;
}

.abstract.expanded .abstract-content {
    max-height: 1000px; /* Large enough to show full content */
}

.full-abstract .abstract-content {
    max-height: none;
}

.read-more {
    display: block;
    margin-top: 10px;
    padding: 5px 10px;
    background: #f0f0f0;
    border: none;
    border-radius: 4px;
    color: #0066cc;
    cursor: pointer;
}

/* Add gradient fade for truncated text */
.abstract-content::after {
    content: '';
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(transparent, white);
    pointer-events: none;
}

.abstract.expanded .abstract-content::after {
    display: none;
}

.architecture img {
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.architecture img:hover {
    transform: scale(1.05);
}

h3 {
    font-size: 1.2em;
    margin-bottom: 0.5rem;
    text-align: center;
}

.abstract p {
    font-size: 0.9em;
    margin-bottom: 1rem;
    text-align: justify;
}

#team-members {
    margin-top: 3rem;
}

#team-members h2 {
    text-align: center;
    margin-bottom: 2rem;
}

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

.team-member {
    text-align: center;
    padding: 1rem;
    color: #333; /* Changed to a dark color for better visibility on light background */
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.team-member img:hover {
    transform: scale(1.1);
}

.team-member h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.member-title {
    font-size: 0.9rem;
    color: #666; /* Changed to a darker color for better visibility */
    margin-bottom: 1rem;
}

.social-links a {
    color: #0066cc; /* Changed to a blue color that works well on light background */
    font-size: 1.2rem;
    margin: 0 0.5rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #004080; /* Darker blue for hover state */
}

@media (max-width: 768px) {
    .logo-container {
        flex-direction: column;
        align-items: center;
    }

    .logo-container h1 {
        text-align: center;
        font-size: 1.5em;
        margin: 10px 0;
    }

    .logo {
        max-width: 100px;
        margin: 5px 0;
    }

    .intro-text {
        font-size: 1em;
        text-align: justify;
        padding: 0 15px;
    }

    .project {
        padding: 20px;
    }

    .links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .button {
        margin: 5px;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Dark mode styles */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode .project {
    background-color: #1e1e1e;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .button {
    background-color: #444;
}

body.dark-mode .button:hover {
    background-color: #666;
}

body.dark-mode .read-more {
    background-color: #333;
    color: #e0e0e0;
}

body.dark-mode .read-more:hover {
    background-color: #444;
}

body.dark-mode .team-member {
    color: #e0e0e0;
}

body.dark-mode .member-title {
    color: #aaa;
}

body.dark-mode .social-links a {
    color: #bbb;
}

body.dark-mode .social-links a:hover {
    color: #fff;
}

/* Toggle Dark Mode button styles */
#dark-mode-toggle {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#dark-mode-toggle:hover {
    background-color: #555;
}

/* Sticky navigation bar styles */
.sticky-nav {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    background-color: #fff;
    padding: 10px 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sticky-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.sticky-nav ul li {
    margin: 0 15px;
}

.sticky-nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s ease;
}

.sticky-nav ul li a:hover {
    color: #0066cc;
}

/* Search functionality styles */
#search-input {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-left: 20px;
    transition: border-color 0.3s ease;
}

#search-input:focus {
    border-color: #0066cc;
}

/* ARIA attributes styles */
[aria-label] {
    outline: none;
}

/* Dark mode styles for sticky navigation bar */
body.dark-mode .sticky-nav {
    background-color: #1e1e1e;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Dark mode styles for search input */
body.dark-mode #search-input {
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #444;
}

body.dark-mode #search-input:focus {
    border-color: #666;
}

/* Dark mode styles for dark mode toggle button */
body.dark-mode #dark-mode-toggle {
    background-color: #444;
    color: #e0e0e0;
}

body.dark-mode #dark-mode-toggle:hover {
    background-color: #666;
}

/* Dark mode styles */
.dark-mode {
    background-color: #1a1a1a;
    color: #ffffff;
}

.dark-mode .project {
    background-color: #2d2d2d;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.dark-mode .header p,
.dark-mode .member-title {
    color: #cccccc;
}

.dark-mode .button {
    background-color: #444;
}

.dark-mode .button:hover {
    background-color: #555;
}

.dark-mode .read-more {
    background-color: #2d2d2d;
    color: #66b3ff;
}

.dark-mode .read-more:hover {
    background-color: #3d3d3d;
}

.dark-mode #dark-mode-toggle {
    background-color: #444;
    color: #fff;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background-color: #555;
    transform: scale(1.05);
}

/* Dark theme styles */
body.dark-theme {
    background-color: #1a1a1a;
    color: #ffffff;
}

body.dark-theme .project {
    background-color: #2d2d2d;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

body.dark-theme .abstract-content::after {
    background: linear-gradient(transparent, #2d2d2d);
}
