/* Elegant Academic LaTeX-like Design */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    --primary: #000000;
    --secondary: #333333;
    --muted: #666666;
    --accent: #0066cc;
    --bg: #ffffff;
    --border: #cccccc;
    --max-width: 1000px;
    --serif: 'Crimson Text', 'Times New Roman', Times, serif;
    --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --sidebar-width: 200px;
}

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

body {
    font-family: var(--serif);
    font-size: 11pt;
    line-height: 1.5;
    color: var(--primary);
    background: var(--bg);
    padding: 20px;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
}

/* Main Layout */
.main-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--bg);
    border-right: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header h3 {
    font-size: 14pt;
    font-weight: 700;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 9pt;
    color: var(--muted);
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 8px;
}

.nav-menu a {
    display: block;
    padding: 8px 12px;
    color: var(--primary);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    font-size: 10pt;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: #f5f5f5;
    color: var(--accent);
}

.nav-menu a.active {
    font-weight: 600;
    border-left: 3px solid var(--accent);
    padding-left: 9px;
}

/* Main Content */
.main-content {
    flex: 1;
    min-width: 0;
}

/* Hamburger Menu (only for mobile) */
.hamburger {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    width: 30px;
    height: 30px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    z-index: 1001;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    transition: background-color 0.2s ease;
}

.hamburger:hover {
    background-color: #f5f5f5;
}

.hamburger span {
    width: 18px;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Header */
header {
    text-align: center;
    padding: 20px 0 15px;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 20px;
}

.name-header {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.profile-pic-container {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    margin-top: 5px;
}

.profile-pic {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--secondary);
    object-fit: cover;
    display: none;
}

.profile-pic-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #f5f5f5;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-pic-placeholder svg {
    width: 60%;
    height: 60%;
}

h1 {
    font-size: 24pt;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    font-size: 10pt;
    align-items: center;
}

.contact-info a {
    color: var(--accent);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.separator {
    color: var(--muted);
    margin: 0 5px;
}

/* Sections */
section {
    margin-bottom: 18px;
}

h2 {
    font-size: 12pt;
    font-weight: 700;
    margin-bottom: 8px;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Entries */
.entry {
    margin-bottom: 15px;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2px;
    flex-wrap: wrap;
}

.entry-subheader {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
    flex-wrap: wrap;
    color: var(--secondary);
}

.entry-header strong {
    font-weight: 600;
}

.entry-subheader em {
    font-style: italic;
}

.date {
    color: var(--muted);
    font-size: 10pt;
    white-space: nowrap;
}

/* Location styling for entry subheaders */
.entry-subheader .location {
    color: var(--muted);
    font-size: 10pt;
    white-space: nowrap;
    margin-left: auto;
}

/* Lists */
ul {
    margin-left: 18px;
    margin-top: 5px;
}

li {
    margin-bottom: 3px;
    text-align: justify;
}

.skills-list {
    list-style: none;
    margin-left: 0;
}

.skills-list li {
    margin-bottom: 8px;
    text-align: left;
    display: flex;
    align-items: flex-start;
}

.skills-list strong {
    font-weight: 600;
    flex-shrink: 0;
    min-width: 200px;
    margin-right: 10px;
}

.skills-list li > span {
    flex: 1;
}

/* Project with video layout */
.project-with-video {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.project-content {
    flex: 1;
}

/* Video Placeholder */
.video-placeholder {
    background: #f8f8f8;
    border: 1px dashed var(--border);
    padding: 15px;
    text-align: center;
    border-radius: 3px;
    flex-shrink: 0;
    width: 200px;
}

.video-placeholder p {
    color: var(--muted);
    font-style: italic;
    font-size: 9pt;
}

.video-placeholder video {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Links */
a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 9pt;
}

/* Bottom spacing for navigation */
.bottom-spacing {
    height: 300px;
    margin-top: 30px;
    background: transparent;
}

/* Large bottom spacing for full screen height */
.large-bottom-spacing {
    height: 100vh;
    margin-top: 30px;
    background: transparent;
}

/* Resume Download Button */
.resume-download {
    text-align: center;
    margin: 20px 0;
}

.download-btn {
    display: inline-block;
    background: #f5f5f5;
    color: var(--accent);
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: normal;
    transition: background-color 0.2s ease;
    border: none;
}

.download-btn:hover {
    background: #e8e8e8;
    color: var(--primary);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .sidebar {
        width: 100%;
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        z-index: 1000;
        border-right: none;
        border-bottom: none;
        padding: 60px 20px 20px;
        max-height: none;
        overflow-y: auto;
        transition: left 0.3s ease;
        background: var(--bg);
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .sidebar-overlay {
        display: block;
    }
    
    .name-header {
        gap: 15px;
    }
    
    h1 {
        font-size: 20pt;
    }
    
    .profile-pic-container {
        width: 65px;
        height: 65px;
    }
    
    .entry-header,
    .entry-subheader {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .entry-subheader .location {
        margin-left: 0;
        margin-top: 2px;
    }
    
    .skills-list li {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .skills-list strong {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 3px;
    }
    
    .project-with-video {
        flex-direction: column;
        gap: 15px;
    }
    
    .video-placeholder {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 10pt;
    }
    
    h1 {
        font-size: 18pt;
    }
    
    .profile-pic-container {
        width: 55px;
        height: 55px;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
    }
    
    .separator {
        display: none;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .hamburger,
    .sidebar-overlay {
        display: none;
    }
    
    .main-layout {
        flex-direction: column;
    }
    
    body {
        padding: 0;
        font-size: 10pt;
    }
    
    .container {
        max-width: 100%;
    }
    
    .profile-pic-container {
        width: 50px;
        height: 50px;
    }
    
    .video-placeholder {
        display: none;
    }
    
    header {
        padding-top: 0;
    }
    
    section {
        page-break-inside: avoid;
    }
    
    a {
        color: var(--primary);
        text-decoration: none;
    }
}