/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a5a3f;        /* Sage green */
    --secondary-color: #87a878;      /* Soft leaf green */
    --accent-color: #c17c5b;         /* Terracotta */
    --text-color: #3d4035;          /* Charcoal green */
    --text-light: #6b6f65;          /* Muted earth */
    --background: #ffffff;
    --background-alt: #f7f5f0;       /* Natural linen */
    --border-color: #d4cfc4;
    --shadow: 0 2px 8px rgba(74, 90, 63, 0.1);
    --shadow-lg: 0 4px 16px rgba(74, 90, 63, 0.15);
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
}

.nav-title {
    font-family: 'Nunito', sans-serif;
}

/* Navigation */
.navbar {
    background: var(--primary-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

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

.nav-title {
    font-size: 1.5rem;
    font-weight: 600;
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

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

/* Sections */
.section {
    margin: 4rem 0;
    padding: 2rem 0;
}

.section h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--secondary-color);
}

/* Hero Section */
.hero {
    padding: 3rem 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    align-items: start;
}

.profile-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--background-alt);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-text h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    border: none;
}

.position {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.bio {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.hero-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn:hover {
    background: #6b7d56;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

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

/* Research Areas */
.research-areas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.research-card {
    background: var(--background-alt);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
    transition: all 0.3s;
}

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

.research-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Publications */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.publication {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--background-alt);
    transition: all 0.3s;
}

.publication:hover {
    box-shadow: var(--shadow);
    border-color: var(--secondary-color);
}

.publication h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

/* PhD Thesis - Separated styling */
.thesis-highlight {
    padding: 2rem;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--background-alt) 0%, #faf8f3 100%);
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
}

.thesis-highlight h3 {
    color: var(--accent-color);
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.thesis-highlight:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(193, 124, 91, 0.2);
}

/* Publications container - single background for all publications */
.publications-container {
    background: var(--background-alt);
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

/* Individual publication items within the container */
.publication-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
}

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

.publication-item:hover {
    padding-left: 1rem;
    border-left: 4px solid var(--secondary-color);
}

.publication-item h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.authors {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.authors strong {
    color: var(--primary-color);
}

.venue {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.pub-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.pub-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
    transition: all 0.3s;
}

.pub-links a:hover {
    background: var(--secondary-color);
    color: white;
}

.view-all {
    display: inline-block;
    margin-top: 2rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.view-all:hover {
    color: #6b7d56;
}

/* CV Section */
.cv-section {
    margin-bottom: 3rem;
}

.cv-section h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
    border-left: 4px solid var(--secondary-color);
}

.cv-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cv-list li {
    padding: 1.5rem;
    background: var(--background-alt);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.cv-list li:hover {
    box-shadow: var(--shadow);
    border-color: var(--secondary-color);
}

.cv-title {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.cv-institution {
    display: block;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.cv-date {
    display: block;
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.cv-detail {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
}

/* Current Work Section */
.current-work {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.location-card,
.work-card,
.status-card {
    padding: 2rem;
    background: var(--background-alt);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
    transition: all 0.3s;
}

.location-card:hover,
.work-card:hover,
.status-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.location-card h3,
.work-card h3,
.status-card h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.affiliation {
    color: var(--text-light);
    font-style: italic;
    margin-top: 0.5rem;
}

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

.work-list li {
    padding: 0.5rem 0;
    color: var(--text-color);
}

.work-list li strong {
    color: var(--secondary-color);
}

/* News Wall Section */
.news-wall {
    max-height: 1000px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--background-alt);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.news-wall::-webkit-scrollbar {
    width: 8px;
}

.news-wall::-webkit-scrollbar-track {
    background: var(--background-alt);
    border-radius: 4px;
}

.news-wall::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

.news-wall::-webkit-scrollbar-thumb:hover {
    background: #6b7d56;
}

.news-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
    transition: all 0.3s;
    position: relative;
}

.news-item:last-child {
    margin-bottom: 0;
}

.news-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(4px);
    border-left-color: var(--accent-color);
}

/* Pinned items: always-visible area above the scrollable feed */
.news-pinned {
    margin-bottom: 1.5rem;
}

.news-item.pinned {
    border-left-color: var(--accent-color);
    background: var(--background-alt);
    box-shadow: var(--shadow-lg);
}

.news-item.pinned::after {
    content: "📌 Pinned";
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 0.02em;
}

.news-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-align: right;
    padding-top: 0.25rem;
}

.news-content h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.news-content p {
    color: var(--text-color);
    line-height: 1.6;
}

/* Other Stuff Section - Keep for compatibility */
.other-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.other-card {
    padding: 2rem;
    background: var(--background-alt);
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.other-card:hover {
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.other-card h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* Animal Facts Section */
.animal-facts {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 3rem 2rem;
    border-radius: 12px;
    margin: 4rem 0;
}

.section-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

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

.fact-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    text-align: center;
}

.fact-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.fact-emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.fact-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.fact-card p {
    color: var(--text-color);
    line-height: 1.6;
}

#refresh-facts {
    display: block;
    margin: 2rem auto 0;
    cursor: pointer;
}

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

.contact-item {
    padding: 1rem;
    background: var(--background-alt);
    border-radius: 8px;
}

.contact-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.contact-item a {
    color: var(--secondary-color);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    grid-column: 1 / -1;
    justify-content: center;
}

.social-links a {
    color: var(--primary-color);
    transition: all 0.3s;
}

.social-links a:hover {
    color: var(--secondary-color);
    transform: scale(1.2);
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

/* Mobile Navigation */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-toggle {
        display: block;
        position: absolute;
        right: 2rem;
        top: 1rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .profile-image {
        width: 200px;
        height: 200px;
    }

    .hero-links {
        justify-content: center;
    }

    .research-areas,
    .current-work,
    .other-grid,
    .facts-grid {
        grid-template-columns: 1fr;
    }

    .news-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .news-date {
        text-align: left;
        font-size: 0.85rem;
    }

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

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

    .section h2 {
        font-size: 1.5rem;
    }

    .hero-text h2 {
        font-size: 2rem;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }
}
