@import url('https://fonts.font.im/css2?family=Ma+Shan+Zheng&display=swap');
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
  scroll-behavior: smooth;
  scroll-behavior: -webkit-smooth;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 32px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(217, 231, 228, 0.5);
  background-color: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #32a59c;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  visibility: hidden;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-to-top::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 12px solid currentColor;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: rgba(50, 165, 156, 0.85);
  color: #ffffff;
}
.resume-container {
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap; 
}
.sidebar {
    flex: 1 1 200px; 
    min-width: 200px;
    background: linear-gradient(135deg, #32a59c, #32a59c);
    color: #e0f7f5;
}
.sticky-box {
    position: -webkit-sticky;
    position: sticky;
    top: 0;                    
    height: 100vh;             
    padding: 40px 20px;        
    text-align: center;
    display: flex;             
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background-attachment: fixed;          
    transform: translateZ(0);             
    backface-visibility: hidden;          
}

.profilepic {
    width: 70%;                
    max-width: 180px;          
    min-width: 110px;         
    aspect-ratio: 1 / 1;       
    object-fit: cover;         
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    margin-bottom: 20px;
    transition: width 0.1s ease-out; 
}
.sidebar h2 { font-size: 1.5rem; margin-bottom: 5px; letter-spacing: 1px; color:#FFD700; }
.zh-name {font-family: 'Ma Shan Zheng', cursive;}
.sidebar .title { font-size: 0.88rem; color: #FFD700; margin-bottom: 25px; }
.contact-info { text-align: left; font-size: 0.95rem; display: flex; flex-direction: column; gap: 12px; width: 100%; }
a.lawfirm {
    text-decoration: none;   
    color: #FFD700;
    transition: color 0.2s ease;
}
a.lawfirm:hover {
    color: #e0f7f5;             
}
i.bi {
    font-family: "bootstrap-icons" !important;
    font-weight: normal !important;
    font-style: normal !important;
    display: inline-block !important;
}
hr { border: none; border-top: 1px solid rgba(255,255,255,0.15); margin: 25px 0; width: 100%; }
.main-content {
    flex: 3 1 600px;
    min-width: 320px;
    padding: 40px 40px 20px; 
    display: flex;
    flex-direction: column;
    gap: 20px;
}
a.tozh,
a.toen {
    text-decoration: none; 
    color:#cf7853;
    transition: color 0.2s ease;
}
a.tozh:hover,
a.toen:hover {
    color: #32a59c;            
}
a.university {
    text-decoration: none;     
    color:#2c3e50;
    transition: color 0.2s ease;
}
a.university:hover {
    color: #795548;             
}
.resume-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.resume-section h2 {
    font-size: 1.2rem;
    color: #32a59c;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.timeline-item { margin-bottom: 10px; }
.timeline-item:last-child { margin-bottom: 0; }
.meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px; }
.meta h3 { font-size: 1.10rem; color: #795548; }
.date { font-size: 0.85rem; color: #64748b; font-weight: 500; }
.company { font-size: 0.95rem; color: #2c3e50; font-weight: 600; margin: 4px 0 10px 0; }
.text-block { font-size: 0.95rem; color: #475569; text-align: justify; }
.skills-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.badge { background-color: #eff6ff; color: #64748b; padding: 6px 14px; border-radius: 20px; font-size: 0.88rem; font-weight: 500; border: 1px solid #dbeafe;transition: all 0.2s ease; }
.badge-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.badge:hover {
  background-color: #f5efe9;
  color: #795548;
}
footer {text-align: center;font-size: 0.85rem;}

@media (max-width: 815px) {
    .sticky-box {
        height: auto; 
        position: relative; 
        padding: 20px 25px; 
        flex-direction: row; 
        justify-content: flex-start; 
        align-items: center;         
        gap: 20px;                   
    }

    .profilepic {
        width: 80px;                
        min-width: 80px;             
        margin-bottom: 0;     
    }

    .sidebar-details {
        display: block !important; 
        flex:1;
        text-align: center;            
        padding-right: 40px;
    }

    .sidebar h2 { 
        font-size: 1.25rem; 
        margin-bottom: 2px; 
    }
    .sidebar .title { 
        font-size: 0.85rem; 
        margin-bottom: 0;            
    }
    .sidebar .contact-info {
        gap: 0px; 
        font-size: 0.85rem; 
        margin-bottom: 0;
        text-align: center;
    }

    .sidebar-details hr,
    .title {
        display: none !important;
    }

    .title1 {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        font-size:0.8rem;
        display: inline-block !important;
    }

    .main-content {
        padding: 25px 15px;    
    }
}