@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;
    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: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.avatar i {
    font-size: 3rem;
    color: #fff;
}

.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;
    transition: color 0.2s;
}

.social-link:hover {
    color: var(--color-accent-text);
}

/* Desktop Theme Toggle Button */
.desktop-theme-toggle {
    background: none;
    border: none;
    color: var(--color-text-tertiary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.desktop-theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: var(--color-accent-text);
    color: var(--color-accent-text);
}

.desktop-theme-toggle i {
    font-size: 1rem;
}

.desktop-theme-toggle i.fa-sun {
    color: #f59e0b;
}

body.dark-mode .desktop-theme-toggle {
    border-color: #444;
}

body.dark-mode .desktop-theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.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;
    top: 0.3rem;
    width: 0.75rem;
    height: 0.75rem;
    background-color: #fff;
    border: 2px solid #d1d5db;
    border-radius: 50%;
}

.timeline-item.active::before {
    border-color: #3b82f6;
    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;
    padding: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}

.project-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
    transform: scale(1.02);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
}

.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;
}

.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;
}

.project-tech {
    color: var(--color-accent-text);
    margin-top: 0.25rem;
    font-size: 0.85rem;
    font-style: italic;
}

/* 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;
    position: absolute;
    top: -1.2rem;
    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;
}

.status-accepted::after {
    border-color: #10b981 transparent transparent transparent;
}

.status-under-review {
    background-color: #f59e0b;
}

.status-under-review::after {
    border-color: #f59e0b transparent transparent transparent;
}

/* 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;
}

/* Dark Mode Support */
body.dark-mode {
    --color-text-primary: #f0f0f0;
    --color-text-secondary: #b0b0b0;
    --color-text-tertiary: #888;
    --color-bg: #121212;
    --color-accent-bg: #1e3a5f;
    --color-accent-text: #60a5fa;
}

body.dark-mode .sidebar {
    background-color: #1a1a1a;
}

body.dark-mode .main-content {
    background-color: #121212;
}

body.dark-mode .nav-link:hover,
body.dark-mode .nav-link.active {
    background-color: #2a2a2a;
}

body.dark-mode .project-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .timeline {
    border-left-color: #333;
}

body.dark-mode .timeline-item::before {
    background-color: #1a1a1a;
    border-color: #444;
}

body.dark-mode .timeline-item.active::before {
    border-color: #60a5fa;
}

body.dark-mode .avatar {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

body.dark-mode .mobile-tab-bar {
    background-color: #1a1a1a;
    border-top-color: #333;
}

/* Theme transition */
body,
.sidebar,
.main-content,
.mobile-tab-bar,
.nav-link,
.project-item,
.timeline,
.avatar {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Mobile Bottom Tab Bar */
.mobile-tab-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-bg);
    border-top: 1px solid #e5e7eb;
    padding: 0.5rem 0;
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--color-text-tertiary);
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.tab-item i {
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
}

.tab-item span {
    text-transform: lowercase;
}

.tab-item.active {
    color: var(--color-accent-text);
}

.tab-item:hover {
    color: var(--color-accent-text);
    transform: translateY(-2px);
}

.theme-toggle i.fa-sun {
    color: #f59e0b;
}

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

    body.dark-mode .sidebar {
        border-bottom-color: #333;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1.5rem;
        padding-bottom: 5rem;
        /* Space for tab bar */
    }

    body {
        flex-direction: column;
    }

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

    .mobile-tab-bar {
        display: flex;
    }

    .nav-menu {
        display: none;
        /* Hide sidebar nav on mobile since we have tab bar */
    }

    .desktop-theme-toggle {
        display: none;
        /* Hide desktop theme toggle on mobile since we have tab bar */
    }
}

/* Very small screens */
@media (max-width: 400px) {
    .tab-item {
        font-size: 0.6rem;
        padding: 0.2rem 0.3rem;
    }

    .tab-item i {
        font-size: 1rem;
    }
}