/* --- Base Variables & Layout --- */
:root {
    --bg-main: #f8fafc;
    --bg-sidebar: #0f172a;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: #e2e8f0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
}

/* --- Sidebar Styling --- */
.sidebar {
    width: 280px;
    height: 100vh;
    background-color: var(--bg-sidebar);
    color: #ffffff;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 1.5rem;
    z-index: 100;
}

.profile-container {
    text-align: center;
}

.profile-img-placeholder {
    width: 90px;
    height: 90px;
    background-color: #1e293b;
    border-radius: 50%;
    margin: 0 auto 1rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-light);
    border: 2px solid #334155;
}

.sidebar h1 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
}

.sidebar .title {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 400;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 2.5rem 0;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-menu a:hover, .nav-menu a.active {
    color: #ffffff;
    background-color: #1e293b;
}

.sidebar-footer {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    font-size: 1.25rem;
}

.sidebar-footer a {
    color: var(--text-light);
    transition: color 0.2s ease;
}

.sidebar-footer a:hover {
    color: #ffffff;
}

/* --- Main Content Area --- */
.content {
    margin-left: 280px;
    padding: 3rem 4rem;
    max-width: 1000px;
    width: calc(100% - 280px);
}

.section {
    padding: 2rem 0;
    scroll-margin-top: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    position: relative;
    letter-spacing: -0.02em;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: var(--accent);
    margin-top: 0.5rem;
    border-radius: 2px;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.card p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.card p:last-child {
    margin-bottom: 0;
}

/* --- Layout Grid Elements --- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.item-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.item-icon {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.item-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

/* --- Publications Layout --- */
.pub-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.pub-item {
    border-left: 3px solid var(--border-color);
    padding-left: 1.25rem;
    transition: border-color 0.2s ease;
}

.pub-item:hover {
    border-left-color: var(--accent);
}

.pub-meta {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.pub-title {
    font-size: 1.05rem;
    color: var(--text-primary) !important;
    margin: 0.25rem 0 !important;
}

.pub-authors {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pub-links {
    margin-top: 0.5rem;
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
}

.pub-links a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.pub-links a:hover {
    color: var(--accent);
}

/* --- Tools Component Layout --- */
.tool-box {
    border: 1px dashed var(--border-color);
    padding: 1.25rem;
    border-radius: 6px;
}

.tool-box h4 {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

/* --- Buttons & UI Interaction --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.contact-card p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1.5rem;
    }
    .nav-menu {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        margin: 1.5rem 0 0 0;
    }
    .content {
        margin-left: 0;
        width: 100%;
        padding: 2rem 1.5rem;
    }
}