:root {
    --primary-color: #0056b3;
    --primary-color-rgb: 0, 86, 179;
    --secondary-color: #555555;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --border-color: #d0d0d0;
    --text-color: #333;
    --text-muted: #555555;
    --success-color: #006e4e;
    --danger-color: #b30000;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --bg-color-rgb: 255, 255, 255;
}

/* Light mode (default) */
body {
    --bg-color: #ffffff;
    --bg-color-rgb: 255, 255, 255;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-color: #d0d0d0;
    --nav-bg: #f8f9fa;
}

/* Dark mode */
body.dark-mode {
    --bg-color: #121212;
    --bg-color-rgb: 18, 18, 18;
    --card-bg: #1e1e1e;
    --text-color: #ffffff;
    --border-color: #555555;
    --nav-bg: #1a1a1a;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header and Navigation */
header {
    padding: 25px 0;
    margin-bottom: 50px;
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo a {
    font-size: 1.7rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary-color);
}

.download-cv-btn {
    font-size: 0.85rem !important;
    padding: 4px 8px !important;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: white !important;
    text-decoration: none !important;
    line-height: 1 !important;
    min-height: unset !important;
    max-height: unset !important;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.85rem;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    justify-content: space-between;
    height: 20px;
    width: 25px;
    margin-left: 15px;
    z-index: 10;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Main Content */
main {
    flex: 1;
    margin-bottom: 60px;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1.2rem;
    line-height: 1.2;
    color: var(--text-color);
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2.2rem;
}

h3 {
    font-size: 1.9rem;
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    text-decoration: underline;
}

.section {
    margin-bottom: 60px;
}

.section-title {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-weight: 600;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Cards and Grids */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.card-category {
    display: inline-block;
    background-color: var(--light-color);
    color: var(--dark-color);
    font-size: 0.8rem;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
}

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

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn:hover {
    opacity: 0.9;
    text-decoration: none;
}

.btn-group {
    display: flex;
    gap: 10px;
}

/* Blog */
.post {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 30px;
}

.post:last-child {
    border-bottom: none;
}

.post-header {
    margin-bottom: 20px;
}

.post-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.post-content {
    margin-bottom: 20px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 20px 0;
}

.post-content pre {
    background-color: var(--light-color);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 20px 0;
}

.post-content blockquote {
    padding-left: 20px;
    border-left: 3px solid var(--primary-color);
    font-style: italic;
    margin: 20px 0;
}

/* Timeline for Research */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    padding: 10px 50px;
    position: relative;
    width: 50%;
    margin-bottom: 20px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    top: 15px;
    right: -10px;
    z-index: 1;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item.right::after {
    left: -10px;
}

.timeline-content {
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.timeline-date {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* About Page */
.about-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.about-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.about-content {
    flex: 2;
    min-width: 300px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    color: var(--text-color);
    text-decoration: none;
}

.social-links a:hover {
    color: var(--primary-color);
}

.social-links a i {
    margin-right: 5px;
}

/* Footer */
footer {
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    font-size: 1rem;
    color: var(--text-color);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-copyright {
    flex: 1;
    min-width: 200px;
    font-weight: 500;
}

.footer-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    text-align: right;
}

.contact-info, .contact-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-weight: 500;
}

.contact-info span, .contact-links span {
    white-space: nowrap;
}

.footer-contact a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Reset all styling in base.html */
    body {
        padding-bottom: 0 !important;
    }
    
    header {
        position: relative !important;
    }
    
    nav {
        flex-direction: column !important;
    }
    
    .logo {
        display: flex !important;
        width: 100% !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .menu-toggle {
        display: flex !important;
    }
    
    .nav-menu {
        all: initial !important;
        display: block !important;
        position: static !important;
        bottom: auto !important;
        left: auto !important;
        width: 100% !important;
        max-height: 0 !important;
        overflow: hidden !important;
        transition: max-height 0.3s ease !important;
        background: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        z-index: 1 !important;
    }
    
    .nav-menu.active {
        max-height: 300px !important;
    }
    
    /* Reset nav-links styling */
    .nav-links {
        all: initial !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        list-style: none !important;
        margin: 15px 0 0 0 !important;
        width: 100% !important;
        padding: 0 !important;
        gap: 0 !important;
    }
    
    .nav-links li {
        margin: 0 !important;
        text-align: center !important;
        flex: 1 !important;
        list-style: none !important;
    }
    
    .nav-links a {
        all: initial !important;
        font-size: 0.9rem !important;
        padding: 5px !important;
        display: block !important;
        text-decoration: none !important;
        color: var(--text-color) !important;
        text-align: center !important;
        font-family: inherit !important;
        font-weight: 500 !important;
    }
    
    .nav-links a.active {
        color: var(--primary-color) !important;
        font-weight: bold !important;
    }
    
    .nav-links a::before {
        display: none !important;
        content: none !important;
    }
    
    .download-cv-btn {
        margin-bottom: 10px;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 20px;
    }
    
    .timeline-item.right {
        left: 0;
    }
    
    .timeline-item::after {
        left: 21px;
    }
    
    .about-container {
        flex-direction: column;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-contact {
        justify-content: center;
        text-align: center;
    }
    
    .container {
        padding: 0 20px;
    }
}

/* Dark Mode Toggle */
.theme-toggle {
    cursor: pointer;
    margin-left: 20px;
    font-size: 1.2rem;
    color: var(--text-color);
}

/* Reading Log */
.paper-list {
    margin-top: 30px;
}

.paper-item {
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    background-color: var(--card-bg);
    box-shadow: var(--box-shadow);
}

.paper-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.paper-authors {
    font-style: italic;
    margin-bottom: 10px;
    color: var(--text-muted);
}

.paper-venue {
    font-weight: 500;
    margin-bottom: 5px;
}

.paper-date {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.paper-notes {
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    margin-top: 15px;
}

/* Utils */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-40 {
    margin-top: 40px;
}

.mb-40 {
    margin-bottom: 40px;
} 