:root {
    --primary-color: #3b82f6;
    --dark-bg: #1e293b;
    --text-main: #334155;
    --text-light: #64748b;
    --sidebar-width: 320px;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    line-height: 1.6;
    color: var(--text-main);
    background-color: #f8fafc;
}

.site-container { display: flex; min-height: 100vh; }

/* SIDEBAR FIXES */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark-bg);
    color: white;
    padding: 50px 30px;
    border-right: 1px solid #e2e8f0;
}

.sidebar-sticky { position: sticky; top: 40px; text-align: center; }

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    /* Adjust this: 5% moves your face DOWN, 50% is center */
    object-position: 50% 5%; 
    border: 5px solid rgba(255,255,255,0.15);
}

.sidebar h1 { font-size: 1.5rem; margin-bottom: 5px; font-weight: 700; }
.sidebar p { color: #94a3b8; font-size: 0.9rem; margin-bottom: 30px; }

/* FIX: Vertical Sidebar Links */
.nav-links { 
    display: flex; 
    flex-direction: column; /* Forces vertical list */
    align-items: flex-start;
    padding-left: 20px;
}

.nav-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 10px 0;
    width: 100%;
    text-align: left;
    transition: 0.3s;
}

.nav-links a i { margin-right: 12px; width: 20px; color: var(--primary-color); }
.nav-links a:hover { color: white; transform: translateX(5px); }

/* MAIN CONTENT */
.main-content { flex: 1; padding: 60px 80px; max-width: 900px; }

h2 { font-size: 1.8rem; color: #0f172a; margin-top: 40px; }

.skill-tag {
    display: inline-block;
    background: #eef4ff;
    color: #2563eb;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    margin: 4px;
    border: 1px solid #d0e1fd;
    font-weight: 600;
}

/* PUBLICATION CARD FIXES */
.year-group { color: var(--primary-color); font-weight: 800; font-size: 1.4rem; margin-top: 40px; margin-bottom: 20px; }

.pub-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.pub-title { display: block; font-weight: 700; color: #0f172a; font-size: 1.1rem; margin-bottom: 8px; line-height: 1.4; }
.pub-authors { display: block; color: #475569; font-size: 0.95rem; margin-bottom: 5px; }
.pub-venue { display: block; color: #94a3b8; font-size: 0.85rem; font-style: italic; margin-bottom: 15px; }

.doi-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #f1f5f9;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 8px;
}
.doi-btn:hover { background: var(--primary-color); color: white; }

/* Responsive */
@media (max-width: 900px) {
    .site-container { flex-direction: column; }
    .sidebar { width: 100%; height: auto; padding: 40px 20px; }
    .main-content { padding: 40px 20px; }
}

/* Contact Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #ffffff;
    /* use absolute positioning to allow dragging */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #94a3b8;
    cursor: pointer;
    background: transparent;
    border: none;
}

.close-btn:hover { color: #0f172a; }

.modal-header { cursor: move; display: flex; align-items: center; gap: 12px; }
.modal-content.dragging { cursor: grabbing; transition: none; }

.form-group { margin-bottom: 15px; }

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #334155;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    box-sizing: border-box;
}

.send-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: 0.3s;
}

.send-btn:hover { background: #2563eb; }

.form-message {
    margin: 12px 0 16px 0;
    font-weight: 600;
    color: #0f172a;
    min-height: 1.2em;
}

.form-message.success { color: #065f46; }
.form-message.error { color: #991b1b; }

.file-info { margin-top: 8px; color: #334155; font-size: 0.9rem; }

/* Button spinner */
.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: rgba(255,255,255,0.95);
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 150ms ease, transform 150ms ease;
}
.btn-spinner.spinning { opacity: 1; transform: scale(1); animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.send-btn[disabled] { opacity: 0.7; cursor: not-allowed; }

.file-preview { margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.file-preview img { max-width: 80px; max-height: 80px; border-radius: 8px; object-fit: cover; border: 1px solid #e6eefc; }
.file-preview .remove-file { background: transparent; border: 1px solid #e2e8f0; padding: 6px 8px; border-radius: 8px; cursor: pointer; color: #334155; }
.file-actions { display:flex; flex-direction: column; align-items: flex-start; }