@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Merriweather:ital,wght@0,300;0,400;0,700;1,300;1,400&display=swap');

:root {
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Merriweather', serif;
    --color-text-primary: #111;
    --color-text-secondary: #555;
    --color-text-tertiary: #777;
    --color-bg: #fff;
    --color-accent-bg: #eef4ff;
    --color-accent-text: #2563eb;
    --sidebar-width: 280px;
    --spacing-unit: 1.5rem;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
    text-transform: lowercase;
}

/* Layout */
.container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

    /* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    padding: calc(var(--spacing-unit) * 2);
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 1px solid transparent; /* Optional divider */
    text-transform: lowercase; /* Force lowercase in sidebar */
}

/* Force lowercase globally except where specifically overridden if needed */
body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
    text-transform: lowercase;
}

.profile-header {
    margin-bottom: 2rem;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    overflow: hidden;
    background: none;
    border: none;
}

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

.profile-name {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-transform: lowercase;
}

.profile-title {
    font-size: 0.9rem;
    color: var(--color-text-tertiary);
}

.nav-menu {
    list-style: none;
    flex-grow: 1;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--color-text-secondary);
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
    font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
    background-color: #f5f5f5;
    color: var(--color-text-primary);
    font-weight: 500;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
}

.social-link {
    color: var(--color-text-tertiary);
    text-decoration: none;
    font-size: 1.2rem;
}

.copyright {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: #999;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 4);
    width: calc(100% - var(--sidebar-width));
    max-width: 900px;
}

section {
    margin-bottom: 4rem;
}

h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
    font-weight: 700;
    text-transform: lowercase;
}

p {
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
    font-size: 1.05rem;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.tag {
    background-color: var(--color-accent-bg);
    color: var(--color-accent-text);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Timeline / Experience */
.timeline {
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid #e5e7eb;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.95rem; /* Adjust based on border width */
    top: 0.3rem;
    width: 0.75rem;
    height: 0.75rem;
    background-color: #fff;
    border: 2px solid #d1d5db; /* Grey border for inactive/past */
    border-radius: 50%;
}

.timeline-item.active::before {
    border-color: #3b82f6; /* Blue border for active */
    background-color: #fff;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.role {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-text-primary);
    text-transform: lowercase;
}

.date {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--color-text-tertiary);
}

.company {
    font-style: italic;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
    display: block;
    font-size: 0.95rem;
}

.timeline-content ul {
    list-style-position: outside;
    padding-left: 1.2rem;
    margin-top: 0.5rem;
}

.timeline-content li {
    margin-bottom: 0.5rem;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

/* Projects / Lists */
.project-list {
    list-style: none;
}

.project-item {
    margin-bottom: 1.5rem;
    position: relative; /* For positioning tooltips if needed */
    padding: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Sleek Apple-like spring easing */
    border: 1px solid transparent;
}

.project-item:hover {
    background-color: rgba(0, 0, 0, 0.03); /* Very subtle darkening */
    transform: scale(1.02); /* Gentle scale up */
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08); /* Soft diffused shadow */
    /* border-color: rgba(0, 0, 0, 0.02); Optional border */
}

.project-item a {
    font-weight: 600;
    color: var(--color-text-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
    position: relative;
    z-index: 2; /* Ensure link stays above other elements on hover */
}

.project-item a:hover {
    border-bottom-color: var(--color-text-primary);
}

.project-desc {
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
    font-size: 0.95rem;
}

/* Paper Status Badges with Hover Effect */
.paper-status {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #fff;
    background-color: #555;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none; /* Allow clicking through to link if overlap */
    position: absolute;
    top: -1.2rem; /* Adjust position to be above */
    left: 0;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.paper-status::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 10px;
    border-width: 4px 4px 0;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.project-item:hover .paper-status {
    opacity: 1;
    transform: translateY(0);
}

/* Status specific colors */
.status-accepted {
    background-color: #10b981; /* Green */
}
.status-accepted::after {
    border-color: #10b981 transparent transparent transparent;
}

.status-under-review {
    background-color: #f59e0b; /* Amber/Orange */
}
.status-under-review::after {
    border-color: #f59e0b transparent transparent transparent;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 1.5rem;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1.5rem;
    }

    body {
        flex-direction: column;
    }
    
    .timeline-header {
        flex-direction: column;
    }
}

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 100; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); 
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--color-bg);
    margin: 10% auto; 
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {transform: translateY(-20px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-button:hover,
.close-button:focus {
    color: var(--color-text-primary);
    text-decoration: none;
}

.portfolio-list {
    list-style: none;
    margin-top: 1.5rem;
}

.portfolio-list li {
    margin-bottom: 0.75rem;
    text-align: center;
}

.portfolio-list a {
    color: var(--color-text-primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
    font-size: 1.1rem;
}

.portfolio-list a:hover {
    border-bottom-color: var(--color-text-primary);
    color: var(--color-accent-text);
}

.experience-duration {
    font-size: 0.85rem;
    color: var(--color-text-tertiary);
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    font-style: italic;
}
