/* Modern Personal Website CSS - Simplified */
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: #ffffff;
    margin: 0;
}

/* Container and Layout */
table#tlayout {
    border: none;
    border-collapse: separate;
    background: white;
    width: 100%;
    max-width: min(1580px, calc(100vw - 96px));
    margin: 0 auto;
}

#layout-menu {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 18px 12px;
    font-size: 0.9em;
    width: 190px;
    text-align: left;
    vertical-align: top;
    border-radius: 8px;
}

#layout-content {
    padding: 0 36px 0 48px;
    border: none;
    background: white;
    text-align: left;
    vertical-align: top;
    width: calc(100% - 190px);
}

/* Language Switcher */
.language-switcher {
    text-align: right;
    padding: 15px max(20px, calc((100vw - 1580px) / 2 + 20px));
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.language-switcher a {
    background: #007bff;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.language-switcher a:hover {
    background: #0056b3;
}

/* Navigation Menu */
div.menu-category {
    border-bottom: 2px solid #007bff;
    margin: 0 0 10px 0;
    padding-bottom: 4px;
    font-weight: bold;
    color: #007bff;
    font-size: 0.95em;
}

div.menu-category:not(:first-child) {
    margin-top: 18px;
}

div.menu-item {
    padding: 4px 0;
    border-left: 3px solid transparent;
    padding-left: 8px;
    margin: 4px 0;
    transition: border-color 0.2s ease;
}

div.menu-item:hover {
    border-left: 3px solid #007bff;
    background: #f1f3f4;
}

#layout-menu a {
    line-height: 1.4em;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
}

#layout-menu a:hover {
    color: #007bff;
}

#layout-menu a.current {
    color: #007bff;
    font-weight: 600;
}

/* Headers */
div#toptitle {
    padding-bottom: 15px;
    margin-bottom: 25px;
    border-bottom: 3px solid #007bff;
}

h1 {
    font-size: 2.2em;
    color: #2c3e50;
    margin: 0;
    font-weight: 700;
}

h2 {
    color: #007bff;
    margin: 35px 0 20px 0;
    padding: 10px 0 8px 0;
    font-size: 1.4em;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
}

h3 {
    font-size: 1.15em;
    color: #495057;
    margin: 20px 0 12px 0;
    font-weight: 600;
    line-height: 1.4;
}

/* Content */
p {
    margin: 12px 0;
    line-height: 1.65;
    color: #2c3e50;
}

/* Profile Image Table */
table.imgtable {
    border: none;
    margin: 20px 0;
}

table.imgtable td {
    border: none;
    text-align: left;
    padding: 0 25px 0 0;
    vertical-align: top;
}

table.imgtable img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s ease;
}

table.imgtable img:hover {
    transform: scale(1.02);
}

/* Special highlight section */
.highlight-section {
    background: linear-gradient(135deg, #f2f5f7);
    color: white;
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
    box-shadow: 0 4px 15px rgba(0,123,255,0.25);
}

.highlight-section p {
    margin: 0;
    font-size: 1.05em;
    line-height: 1.6;
}

/* Lists */
ul, ol {
    margin: 15px 0;
    padding-left: 25px;
}

li {
    margin: 10px 0;
    line-height: 1.6;
}

li p {
    margin: 5px 0;
}

/* Links */
a {
    color: #007bff;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Awards and Competition styling */
.award-list {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #28a745;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Papers styling */
.paper-list {
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #ffc107;
    margin: 20px 0;
    background: #fefef9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Skills section */
.skills-section {
    background: #f8fbff;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #007bff;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Course grades styling */
.grades-section {
    background: #f8fafc;
    padding: 25px;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Download links */
.download-links {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.download-links a {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 12px 24px;
    margin: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,123,255,0.3);
}

.download-links a:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.4);
}

/* Research projects styling */
.project-item {
    border-left: 4px solid #17a2b8;
    padding: 20px;
    margin: 25px 0;
    border-radius: 0 10px 10px 0;
    background: #f8feff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.project-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateX(2px);
}

.open-source-item {
    border-left-color: #6f42c1;
    background: #fbf9ff;
}

/* Institution info */
.institution-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.institution-info p img {
    vertical-align: middle;
    position: relative;
    top: 2px;
    margin: 0 6px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    table#tlayout {
        width: 100%;
        max-width: none;
    }
    
    #layout-menu {
        width: 100%;
        margin-bottom: 20px;
    }
    
    #layout-content {
        padding: 0 15px;
        width: 100%;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    h2 {
        font-size: 1.3em;
        margin: 30px 0 15px 0;
    }
    
    .download-links a {
        display: block;
        margin: 10px 0;
    }
    
    .highlight-section, .award-list, .paper-list, .skills-section, .project-item, .visitor-map-section {
        padding: 20px;
        margin: 15px 0;
    }
    
    .visitor-map-section {
        padding: 15px;
    }
    
    #visitor-map {
        height: 300px !important;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.6em;
    }
    
    h2 {
        font-size: 1.2em;
    }
    
    .highlight-section, .award-list, .paper-list, .skills-section, .project-item {
        padding: 15px;
        margin: 10px 0;
    }
    
    table.imgtable td {
        padding: 0 15px 0 0;
    }
}

/* Print styles */
@media print {
    #layout-menu { 
        display: none; 
    }
    
    body {
        font-size: 12px;
        color: black;
    }
    
    .highlight-section {
        background: #f0f0f0 !important;
        color: black !important;
    }
    
    .project-item, .award-list, .paper-list, .skills-section {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}
