/* Minimal LaTeX-inspired Theme */

/* Dark Mode (Active) */
:root {
    --bg: #1e1e1e;
    --bg-alt: #141414;
    --text: #ddd;
    --text-dim: #ddd;
    --accent: #eee;
    --pub-link-color: #8eccff;
    --border: #2a2a2a;
    --nav-bg: rgba(15, 15, 15, 0.98);
    --nav-border: #949494;
    --nav-text-active: #f5f5f5;
    --shadow: rgba(0, 0, 0, 0.5);
}

/* Light Mode (Uncomment to activate) */
/* :root {
    --bg: #ebebeb;
    --bg-alt: #f0f0f0;
    --text: #1a1a1a;
    --text-dim: #3b3b3b;
    --accent: #444;
    --border: #d0d0d0;
    --nav-bg: rgba(255, 255, 255, 0.98);
    --nav-border: #888;
    --shadow: rgba(0, 0, 0, 0.15);
} */


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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Computer Modern Serif', 'Palatino', 'Georgia', serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-size: 14px;
    max-width: 720px;
    margin: 2rem auto;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    z-index: 100;
    padding: 0.8rem 0;
    display: flex;
    justify-content: center;
}

.nav-container {
    max-width: fit-content;
    padding: 0.5rem 1.5rem;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--nav-border);
    border-radius: 20px;
    box-shadow: 0 2px 8px var(--shadow);
}

.nav-logo {
    display: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all .2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--nav-text-active);
    text-shadow: 0 0 0.5px currentColor, 0 0 0.5px currentColor;
}

/* Header */
header {
    margin-top: 50px;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 60px;
}

.header-content {
    max-width: 650px;
    margin: 0 auto;
    display: flex;
    gap: 1.5rem;
    align-items: start;
}

.profile-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 1px solid var(--border);
    object-fit: cover;
    flex-shrink: 0;
}

.header-info {
    flex: 1;
}

.name {
    font-size: 1.6rem;
    font-weight: normal;
    margin-bottom: 0.2rem;
}

.title {
    font-size: 0.9rem;
    color: var(--text-dim);
    font-style: italic;
    margin-bottom: 0.2rem;
}

.affiliation {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 0.6rem;
}

/* Main */
main {
    max-width: 650px;
    margin: 0 auto;
    padding: 1rem;
}

.section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 60px;
}

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

.section h2 {
    font-size: 1.25rem;
    color: var(--accent);
    margin-bottom: 0.7rem;
    /* text-transform: uppercase; */
    /* letter-spacing: 0.15em; */
    font-weight: bold;
}

.content p {
    margin-bottom: 0.3rem;
    text-align: justify;
}

/* Links */
.links-section {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.link-button {
    padding: 0.25rem 0.6rem;
    background: var(--bg-alt);
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--border);
    font-size: 0.75rem;
    transition: all 0.2s;
}

.link-button:hover {
    background: var(--border);
}

/* Research Topics */
.subsection-title {
    font-style: italic;
    color: var(--text-dim);
    margin: 0.6rem 0 0.4rem;
    font-size: 0.85rem;
}

.research-topics {
    list-style: none;
    columns: 2;
    column-gap: 1rem;
}

.research-topics li {
    padding: 0.2rem 0 0.2rem 0.8rem;
    position: relative;
    font-size: 0.85rem;
    break-inside: avoid;
}

.research-topics li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-dim);
}

/* Publications */
.publication {
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: var(--bg-alt);
    border-left: 2px solid var(--border);
}

.pub-title {
    font-size: 0.95rem;
    font-weight: bold;
    font-style: italic;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.pub-authors {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.2rem;
}

.pub-venue {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 0.3rem;
}

.pub-link {
    color: var(--pub-link-color);
    text-decoration: none;
    font-size: 0.8rem;
}

.pub-link:hover {
    text-decoration: underline;
}

/* Teaching */
.teaching-item {
    padding: 0.5rem 0.7rem;
    margin-bottom: 0.3rem;
    background: var(--bg-alt);
    font-size: 0.85rem;
}

.teaching-term {
    color: var(--text-dim);
    margin-left: 0.4rem;
    font-size: 0.8rem;
}

/* Education */
.edu-item {
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: var(--bg-alt);
    display: flex;
    gap: 1rem;
    align-items: start;
}

.edu-logo {
    width: 50px;
}

.edu-content {
    flex: 1;
}

.edu-degree {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 0.2rem;
}

.edu-minor {
    color: var(--text-dim);
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 0.2rem;
}

.edu-year {
    color: var(--text-dim);
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
}

.edu-school {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.edu-detail {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.1rem;
}

/* Experience */
.exp-item {
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: var(--bg-alt);
    display: flex;
    gap: 1rem;
    align-items: start;
}

.exp-logo {
    width: 50px;
}

.exp-content {
    flex: 1;
}

.exp-title {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 0.2rem;
}

.exp-date {
    color: var(--text-dim);
    font-size: 0.8rem;
    font-style: italic;
    margin-bottom: 0.2rem;
}

.exp-org {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.exp-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-align: justify;
}

/* Cube */
.cube-container {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
    perspective: 500px;
}

.cube {
    width: 100px;
    height: 100px;
    position: relative;
    transform-style: preserve-3d;
    animation: spin 4s infinite linear;
}

.face {
    position: absolute;
    width: 100px;
    height: 100px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    opacity: 0.9;
}

.front  { transform: rotateY(0deg) translateZ(50px); }
.back   { transform: rotateY(180deg) translateZ(50px); }
.right  { transform: rotateY(90deg) translateZ(50px); }
.left   { transform: rotateY(-90deg) translateZ(50px); }
.top    { transform: rotateX(90deg) translateZ(50px); }
.bottom { transform: rotateX(-90deg) translateZ(50px); }

@keyframes spin {
    from { transform: rotateX(0deg) rotateY(0deg); }
    to { transform: rotateX(360deg) rotateY(360deg); }
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 700px) {
    nav {
        padding: 0.6rem 0.5rem;
    }
    
    .nav-container {
        padding: 0.3rem 0.8rem;
        max-width: calc(100vw - .5rem);
    }
    
    .nav-links {
        gap: 0.6rem;
        justify-content: center;
    }
    
    .nav-link {
        font-size: 0.8rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    
    .profile-image {
        width: 80px;
        height: 80px;
    }
    
    header {
        padding: 1rem;
    }
    
    main {
        padding: 0.8rem;
    }
    
    .research-topics {
        columns: 1;
    }

    .links-section {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
        justify-content: center;
    }
}

@media (max-width: 500px) {
    .nav-container {
        padding: 0.25rem 0.6rem;
        max-width: calc(100vw - 0rem);
    }
    
    .nav-links {
        gap: 0.4rem;
    }
    
    .nav-link {
        font-size: 0.75rem;
        padding: 0.1rem 0;
    }
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}
