/* --- THEME: --- */
:root {
    --primary-color: #1B4D3E; /* Brunswick/Forest Green */
    --accent-color: #a46212;  /* Antique Brass / Muted Brown */
    --bg-color: #FDFBF7;      /* Warm Parchment / Off-white */
    --text-color: #3E2723;    /* Very Dark Brown / Sepia */
    --light-bg: #F3EFE9;      /* Slightly darker parchment for cards/callouts */
    --border-color: #D7CCC8;  /* Warm Gray/Brown */
}

/* --- GLOBAL STYLES --- */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: 'Merriweather', serif;
    color: var(--primary-color);
    margin-bottom: 15px;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* --- HEADER & NAVIGATION --- */
header {
    background-color: #fff;
    border-bottom: 3px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.nav-brand {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-links li {
    display: inline-block;
}

.nav-links a.nav-item {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: #555;
    text-decoration: none;
    padding: 5px 10px;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    display: inline-block;
}

.nav-links a.nav-item:hover, .nav-links a.nav-item.active {
    color: var(--primary-color);
    font-weight: 700;
    border-bottom: 2px solid var(--accent-color);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
}

section { padding: 40px 0; animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- HOME PAGE STYLES --- */
.profile-header { display: flex; gap: 40px; align-items: flex-start; margin-bottom: 40px; }
.profile-img { width: 200px; height: 200px; background-color: #ddd; border-radius: 50%; object-fit: cover; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 5px solid #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.15); }
.quote-box { font-style: italic; color: #555; border-left: 4px solid var(--accent-color); padding-left: 15px; margin: 20px 0; background: var(--light-bg); padding: 15px; border-radius: 0 5px 5px 0; }
.textjustify { text-align: justify; }

/* --- RESEARCH PAGE STYLES --- */
.publication-item { margin-bottom: 25px; padding-bottom: 25px; border-bottom: 1px solid #eee; }
.publication-item:last-child { border-bottom: none; }
.pub-title { font-weight: 700; color: var(--primary-color); display: block; margin-bottom: 5px; }
.pub-meta { font-size: 0.95rem; color: #555; margin-bottom: 8px; }
.pub-abstract { font-size: 0.9rem; color: #666; text-align: justify; }
.badge { display: inline-block; background-color: #eee; color: #333; padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; margin-right: 5px; font-weight: 500; }
.badge-working { background-color: #fff3cd; color: #856404; }
.badge-progress { background-color: #e3f2fd; color: #0d47a1; }
.badge-pub { background-color: #d4edda; color: #155724; }

/* --- BOOKSHELF & RESOURCES TABLES --- */
.filter-controls { display: flex; gap: 15px; justify-content: center; margin-bottom: 25px; flex-wrap: wrap; }
.filter-input { padding: 10px 15px; border: 1px solid #ddd; border-radius: 5px; width: 300px; font-family: 'Roboto', sans-serif; }
.filter-select { padding: 10px 15px; border: 1px solid #ddd; border-radius: 5px; font-family: 'Roboto', sans-serif; background-color: #f9f9f9; cursor: pointer; }
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.05); table-layout: fixed; }
.data-table th { background-color: var(--primary-color); color: #fff; padding: 12px 20px; text-align: left; font-size: 0.9rem; text-transform: uppercase; }
.data-table td { padding: 15px 20px; border-bottom: 1px solid #eee; vertical-align: top; word-wrap: break-word; }
.data-table tr:hover { background-color: #f8f9fa; }
.data-tag { display: inline-block; font-size: 0.75rem; padding: 2px 8px; border-radius: 10px; background-color: #e9ecef; color: #666; margin-right: 4px; margin-bottom: 4px; font-weight: 500; white-space: nowrap; }
.item-title { font-weight: 700; color: var(--primary-color); font-size: 1.05rem; display: block; margin-bottom: 4px; }
.item-author { font-style: italic; color: #555; font-size: 0.9rem; }
.item-summary { font-size: 0.9rem; color: #444; line-height: 1.5; }

/* --- TAG COLORS (Restored) --- */
/* Book Tags */
.tag-non-fiction { background-color: #e3f2fd; color: #0d47a1; }
.tag-fiction { background-color: #f3e5f5; color: #4a148c; }
.tag-econ { background-color: #e8f5e9; color: #1b5e20; }
.tag-psych { background-color: #fff3e0; color: #e65100; }
.tag-history { background-color: #fff8e1; color: #f57f17; }
.tag-self { background-color: #fbe9e7; color: #d84315; }

/* Resource Tags */
.tag-my-project { background-color: #e3f2fd; color: #0d47a1; border: 1px solid #bbdefb; }
.tag-stata { background-color: #e8f5e9; color: #1b5e20; }
.tag-r { background-color: #f3e5f5; color: #4a148c; }
.tag-python { background-color: #fff3e0; color: #e65100; }
.tag-career { background-color: #fff8e1; color: #f57f17; }
.tag-pre-doc { background-color: #fff3e0; color: #ef6c00; }
.tag-phd { background-color: #fbe9e7; color: #d84315; }
.tag-data { background-color: #e0f7fa; color: #006064; }
.tag-econometrics { background-color: #f3e5f5; color: #7b1fa2; }

/* --- HOBBY GALLERY STYLES --- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; padding: 10px 0; }
.gallery-item { background: #ffffff; padding: 15px 15px 20px 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.08); margin: 0; transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid #eee; position: relative; }
.gallery-item:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.15); border-color: var(--accent-color); }
.gallery-item img { width: 100%; height: 220px; object-fit: cover; display: block; filter: brightness(0.98); transition: filter 0.3s ease; }
.gallery-item:hover img { filter: brightness(1.05); }
.gallery-caption { margin-top: 15px; font-family: 'Merriweather', serif; font-size: 0.95rem; color: var(--primary-color); text-align: center; font-weight: 300; letter-spacing: 0.5px; }
.gallery-caption::after { content: ''; display: block; width: 30px; height: 2px; background-color: var(--accent-color); margin: 8px auto 0; opacity: 0.5; }

/* --- FOOTER --- */
footer { margin-top: auto; background-color: var(--primary-color); border-top: 5px solid var(--accent-color); color: #fff; padding: 40px 0; text-align: center; }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 15px; }
.social-links { display: flex; gap: 15px; }
.social-links a { color: #fff; font-size: 1.2rem; opacity: 0.8; transition: opacity 0.3s; }
.social-links a:hover { opacity: 1; color: var(--accent-color); }
.contact-info { font-size: 0.9rem; opacity: 0.9; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .profile-header { flex-direction: column; align-items: center; text-align: center; }
    .nav-links { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: #fff; box-shadow: 0 5px 5px rgba(0,0,0,0.1); padding: 20px; text-align: center; border-bottom: 3px solid var(--accent-color); }
    .nav-links.active { display: flex; }
    .menu-toggle { display: block; }
    .filter-input { width: 100%; }
    .data-table thead { display: none; }
    .data-table td { display: block; padding: 10px 15px; }
    .data-table td:first-child { padding-bottom: 5px; border-bottom: none; }
    .data-table td:last-child { padding-top: 0; border-bottom: 1px solid #eee; }
}