/* DESIGN TOKENS (Light Mode) */
:root {
    --bg-color: #fbfbf8;
    --surface-color: #ffffff;
    --surface-muted: #f2f5f1;
    --text-primary: #161616;
    --text-secondary: #3f4641;
    --text-tertiary: #687069;
    --accent-color: #0a6847;
    --accent-secondary: #6d4aff;
    --border-color: #d7ddd4;
    --hover-bg: #edf3ea;
    --badge-accepted-bg: #dff3e8;
    --badge-accepted-color: #07583c;
    --badge-review-bg: #ece8ff;
    --badge-review-color: #4830a3;
    --btn-primary-bg: #0a6847;
    --btn-primary-color: #ffffff;
    --heading-font: 'Inter', sans-serif;
    --body-font: 'Inter', sans-serif;
    --sidebar-width: 320px;
}

/* DESIGN TOKENS (Dark Mode Auto-Switch) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #11140f;
        --surface-color: #181d17;
        --surface-muted: #20281f;
        --text-primary: #f2f5ef;
        --text-secondary: #c7d0c3;
        --text-tertiary: #9aa596;
        --accent-color: #80d6ad;
        --accent-secondary: #b9a7ff;
        --border-color: #354033;
        --hover-bg: #243023;
        --badge-accepted-bg: #123d2e;
        --badge-accepted-color: #9de7be;
        --badge-review-bg: #30285a;
        --badge-review-color: #c9bdff;
        --btn-primary-bg: #6fc99f;
    }
}

/* BASE & TYPOGRAPHY */
* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
body { font-family: var(--body-font); color: var(--text-primary); background-color: var(--bg-color); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-color); text-decoration: none; transition: all 0.2s ease; }
a:hover { text-decoration: underline; color: var(--accent-secondary); }
h1, h2, h3, h4, h5, h6 { font-family: var(--heading-font); font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem; letter-spacing: -0.02em; line-height: 1.2; }

/* DASHBOARD LAYOUT */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--surface-color);
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
}
.sidebar-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 2.5rem 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
.sidebar-sticky::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}
.main-content {
    flex-grow: 1;
    min-width: 0;
    padding: 0 3rem 3rem 3rem;
    background-color: var(--bg-color);
}
.content-container {
    max-width: 850px;
    margin: 0 auto;
}

/* SIDEBAR HERO */
.hero-card { display: flex; flex-direction: column; gap: 1rem; }
.profile-pic { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface-muted); margin-bottom: 0.5rem; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1); }
.hero-text h1 { font-size: 1.75rem; margin-bottom: 0.25rem; font-weight: 800; }
.eyebrow { color: var(--accent-color); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; display: block; }
.tagline { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1rem; line-height: 1.5; }
.location { color: var(--text-tertiary); font-size: 0.85rem; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem; }
.hero-actions { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }

/* BUTTONS */
.btn-cv, .btn-secondary, .bibtex-btn {
    display: inline-flex; justify-content: center; align-items: center; gap: 0.5rem;
    padding: 0.6rem 1rem; border-radius: 8px; font-weight: 600; font-size: 0.9rem;
    transition: all 0.2s ease; cursor: pointer; border: none; text-decoration: none;
}
.btn-cv { background-color: var(--accent-color); color: #ffffff; box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2); }
.btn-cv:hover { background-color: var(--accent-secondary); color: #ffffff; transform: translateY(-2px); text-decoration: none; }
.btn-secondary { background-color: var(--surface-muted); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background-color: var(--hover-bg); transform: translateY(-2px); text-decoration: none; }

/* NAVIGATION */
.sidebar-nav { margin-top: auto; border-top: 1px solid var(--border-color); padding-top: 1.5rem; }
.nav-links { display: flex; flex-direction: column; gap: 0.5rem; }
.nav-links a { padding: 0.5rem 0.75rem; color: var(--text-secondary); font-weight: 500; border-radius: 6px; transition: all 0.2s; font-size: 0.95rem; }
.nav-links a:hover { background-color: var(--hover-bg); color: var(--accent-color); text-decoration: none; transform: translateX(4px); }

/* SOCIAL LINKS */
.social-links { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); }
.social-links a { color: var(--text-tertiary); font-size: 0.9rem; display: flex; align-items: center; gap: 0.4rem; transition: color 0.2s, transform 0.2s; }
.social-links a:hover { color: var(--accent-color); text-decoration: none; }

/* MAIN CONTENT SECTIONS */
.section-heading { 
    margin-bottom: 2rem; 
    border-bottom: 2px solid var(--border-color); 
    padding: 3rem 0 0.75rem 0; 
    position: sticky;
    top: 0;
    background: var(--bg-color);
    z-index: 10;
}
.section-heading h2 { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0; }
.section-heading p { color: var(--text-secondary); font-size: 1.05rem; margin-top: 0.5rem; }

/* GRIDS & CARDS */
.project-grid, .focus-grid { display: grid; gap: 1.5rem; margin-bottom: 3rem; }
.full-grid { grid-template-columns: 1fr; }
.item, .focus-item { background-color: var(--surface-color); border: 1px solid var(--border-color); border-radius: 12px; padding: 1.5rem; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02); }
.item:hover, .focus-item:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01); border-color: var(--accent-secondary); }
.card-kicker, .focus-kicker { color: var(--accent-color); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-bottom: 0.5rem; display: block; letter-spacing: 0.05em; }
.project-title, .focus-item h3 { font-size: 1.25rem; margin-bottom: 0.5rem; font-weight: 700; }
.item p, .focus-item p { color: var(--text-secondary); margin-bottom: 1rem; font-size: 0.95rem; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
.card-tagline { font-size: 0.85rem; color: var(--text-tertiary); margin: 0 !important; }
.links a, .meta-group .links a { font-size: 0.9rem; font-weight: 600; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.5rem; border-radius: 4px; transition: background-color 0.2s; }
.links a:hover { background-color: var(--hover-bg); text-decoration: none; }

/* PUBLICATION SPECIFICS */
.item-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; gap: 1rem; }
.meta-group { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.meta-group .date { color: var(--text-tertiary); font-size: 0.85rem; font-weight: 600; }
.badge { padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; display: inline-block; }
.badge-review { background-color: var(--badge-review-bg); color: var(--badge-review-color); }
.badge-accepted { background-color: var(--badge-accepted-bg); color: var(--badge-accepted-color); }
.authors { display: block; color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 0.5rem; }
.authors strong { color: var(--text-primary); }
.venue { font-weight: 600; color: var(--accent-color); font-size: 0.9rem; margin-bottom: 1rem; display: block; }
.details { margin-left: 1.25rem; margin-bottom: 1.5rem; color: var(--text-secondary); font-size: 0.95rem; }
.details li { margin-bottom: 0.5rem; }

/* BIBTEX TOGGLE */
.bibtex-toggle { margin-top: 1rem; }
.bibtex-btn { background-color: var(--surface-muted); color: var(--text-primary); border: 1px solid var(--border-color); font-size: 0.8rem; padding: 0.4rem 0.75rem; border-radius: 6px; }
.bibtex-btn:hover { background-color: var(--hover-bg); transform: none; }
.bibtex-block { display: none; background-color: #0f172a; color: #e2e8f0; padding: 1.25rem; border-radius: 8px; font-family: monospace; font-size: 0.85rem; margin-top: 0.75rem; overflow-x: auto; box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); }
.bibtex-toggle.open .bibtex-block { display: block; }

/* ABOUT SECTION SPECIFICS */
.about-intro { font-size: 1.1rem; margin-bottom: 2rem; color: var(--text-secondary); line-height: 1.7; }
.subsection-heading { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 1.25rem; color: var(--text-primary); }
.timeline-item { position: relative; padding-left: 1.5rem; margin-bottom: 1.5rem; border-left: 2px solid var(--border-color); }
.timeline-item::before { content: ''; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background-color: var(--accent-color); }
.timeline-date { font-size: 0.85rem; font-weight: 600; color: var(--text-tertiary); display: block; margin-bottom: 0.25rem; }
.timeline-title { font-weight: 700; font-size: 1.1rem; color: var(--text-primary); margin-bottom: 0.25rem; }
.timeline-desc { font-size: 0.95rem; color: var(--text-secondary); }

/* FOOTER */
footer { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border-color); text-align: center; color: var(--text-tertiary); font-size: 0.85rem; }

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
    .dashboard-layout { flex-direction: column; }
    .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); }
    .sidebar-sticky { position: static; height: auto; padding: 2rem; }
    .hero-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
    .hero-actions { flex-direction: row; justify-content: center; width: 100%; flex-wrap: wrap; }
    .location { justify-content: center; }
    .social-links { justify-content: center; border-top: none; padding-top: 0; margin-top: 0.5rem; }
    .sidebar-nav { border-top: none; padding-top: 1rem; margin-top: 1rem; text-align: center; }
    .nav-links { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    
    .main-content { padding: 2rem 1.5rem; }
    .item-header { flex-direction: column; align-items: flex-start; }
    .meta-group { align-items: flex-start; flex-direction: row; flex-wrap: wrap; margin-top: 0.5rem; }
}
