/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #f59e0b;
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --hover-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%;
}



/* Typography */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 1);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid #475569;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffffff;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover {
    color: #ffffff;
}

.nav-menu a.active {
    color: #ffffff;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #e2e8f0;
    margin: 3px 0;
    transition: 0.3s;
}

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

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

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

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    z-index: 998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Navigation Menu */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: auto;
    min-width: 200px;
    max-width: 280px;
    height: auto;
    min-height: 300px;
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(10px);
    z-index: 999;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    padding: 80px 20px 30px 20px;
    border-radius: 0 0 0 12px;
    pointer-events: auto;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    text-align: center;
    width: 100%;
    padding: 0;
    margin-top: 1rem;
}

.mobile-nav a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    white-space: nowrap;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.mobile-nav a.active {
    background: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transform: translateX(5px);
}

.mobile-nav-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #e2e8f0;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
    padding-top: 80px;
    padding-bottom: 20px;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 0.5fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
    text-align: justify;
}

.description-break {
    display: block;
    height: 1rem;
}

.hero-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-width: 800px;
}

.hero-contact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
    max-width: 800px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

.info-item:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.info-item i {
    color: var(--primary-color);
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

.info-item span {
    font-weight: 500;
}



.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;  /* Set font size */
    line-height: 1;  /* Ensure text vertical centering */
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    text-align: center;  /* Ensure text horizontal centering */
    vertical-align: middle;  /* Ensure button vertical centering in line */
    min-width: 140px;  /* Set minimum width to ensure consistent button size */
    box-sizing: border-box;  /* Ensure padding and border are included in width */
}

.btn-primary {
    background: var(--gradient);
    color: white;
    border: 2px solid transparent;  /* Add transparent border to ensure consistent size with secondary button */
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
}

.profile-image {
    width: 500px;
    height: 500px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--hover-shadow);
    border: 4px solid var(--primary-color);
}

.profile-image img {
    width: 120%;
    height: 120%;
    object-fit: cover !important;
    object-position: 85% 0% !important; /* Force position application */
    transform: translateY(-16%); /* Move up by 16% */
    transition: transform 0.3s ease;
}

.profile-image:hover img {
    transform: translateY(-16%) scale(1.25); /* Maintain upward position while scaling */
}



/* Experience Section */
.experience {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

@media (max-width: 768px) {
    .experience {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {
    .experience {
        padding: 3rem 0;
    }
}

.timeline {
    position: relative;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 1.5rem;  /* Reduced from 3rem to 1.5rem for more compact cards */
    position: relative;
}

.timeline-content {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    position: relative;
    width: calc(50% - 30px);
    margin-left: auto;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.3s ease;
}

.timeline-content:hover {
    box-shadow: var(--hover-shadow);
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 0;
    margin-right: auto;
    margin-top: -8rem;  /* Move left card up for more compact layout with right card */
}

.timeline-item:nth-child(odd):not(:first-child) .timeline-content {
    margin-top: -8rem;  /* Move right card up as well, except for the first one */
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translateY(-50%);
}

.timeline-item:nth-child(odd) .timeline-content::before {
    left: -40px;
}

.timeline-item:nth-child(even) .timeline-content::before {
    right: -40px;
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.timeline-content h4 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.timeline-date {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content ul {
    list-style: none;
    text-align: justify;
}

.timeline-content .timeline-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.timeline-content li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.timeline-content li::before {
    content: '▸';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

/* Skills Section */
.skills {
    padding: 6rem 0;
    background: var(--bg-tertiary);
    padding-top: 1rem;
}

@media (max-width: 768px) {
    .skills {
        padding: 2rem 0;
    }
}

@media (max-width: 480px) {
    .skills {
        padding: 1.5rem 0;
    }
}

.container-skills {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 3rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.category-header h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin: 0;
}

.sort-btn {
    background: var(--gradient);
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--bg-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.sort-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.sort-btn i {
    transition: transform 0.3s ease;
}

.sort-btn.asc i {
    transform: rotate(180deg);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;  /* Changed to center alignment */
    gap: 1rem;
}

.skill-item span {
    color: var(--text-secondary);
    font-weight: 500;
    width: 330px;  /* Fixed text width, changed from min-width to width */
    flex-shrink: 0;  /* Prevent text area from being compressed */
    word-wrap: break-word;  /* Allow long text to wrap */
    line-height: 1.4;  /* Adjust line height */
    text-align: left;
}

.skill-category:nth-child(1) .skill-item span {
    max-width: 230px;  /* For example, adjust to 250px */
}

.skill-bar {
    flex: 1;
    max-width: 200px;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.skill-category:nth-child(1) .skill-bar {
    max-width: 280px;  /* For example, adjust to 250px */
}

.skill-progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 1s ease;
}

/* Education Section */
.education {
    padding: 6rem 0;
    background: var(--bg-tertiary);
}

@media (max-width: 768px) {
    .education {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {
    .education {
        padding: 3rem 0;
    }
}

.container-education {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* 3 equal-width columns */
    gap: 2rem;
    margin-top: 3rem;
}

.education-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    gap: 1.5rem;
    box-shadow: var(--card-shadow);
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.education-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--bg-primary);
    flex-shrink: 0;
}

.education-content h2 {
    color: var(--primary-color);
    margin-bottom: 0.3rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.education-content h3 {
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    font-weight: 500;
    font-size: 1.2rem;
}

.education-university {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 1.1rem;
}

.education-date {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.education-location {
    color: var(--text-muted);
    margin-bottom: 0;
    font-size: 1.1rem;
}

.education-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.education-highlights span {
    background: var(--bg-primary);
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Projects Section */
.projects {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

@media (max-width: 768px) {
    .projects {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {
    .projects {
        padding: 3rem 0;
    }
}

.container-projects {
    max-width: 2000px;
    margin: 0 auto;
    padding: 0 20px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--card-shadow);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.project-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.project-content {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.project-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;  /* Reduce bottom margin to leave space for meta information */
    font-size: 1.3rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.project-meta {
    display: flex;
    align-items: center;  /* Changed to bottom alignment */
    gap: 0.8rem;  /* Adjust spacing to keep company and time close */
    margin-bottom: 1rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
}

.project-company {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1.1rem;
}

.project-date {
    color: var(--accent-color);
    font-weight: 600;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.project-link:hover {
    color: var(--secondary-color);
    border-bottom: 1px solid var(--secondary-color);
    text-decoration: none;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
    text-align: justify;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.project-content ul {
    list-style: none;
    margin-bottom: 1rem;
    text-align: justify;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.project-content li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.project-content li::before {
    content: '▸';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.project-gallery {
    position: relative;
    margin: 1.5rem 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-gallery:hover {
    transform: translateY(-2px);
}

/* Add gradient mask effect */
.project-gallery {
    --left-gradient-opacity: 0;
    --right-gradient-opacity: 1;
}

.project-gallery::before,
.project-gallery::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.project-gallery::before {
    left: 0;
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(255, 255, 255, 0.5) 50%, 
        transparent 100%);
    opacity: var(--left-gradient-opacity);
}

.project-gallery::after {
    right: 0;
    background: linear-gradient(to left, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(255, 255, 255, 0.5) 50%, 
        transparent 100%);
    opacity: var(--right-gradient-opacity);
}

.gallery-container {
    display: flex;
    gap: 1rem;
    transition: transform 0.3s ease;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    cursor: grab;
}

.gallery-container:active {
    cursor: grabbing;
}

.gallery-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.gallery-thumbnail {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.gallery-thumbnail:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 15;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.gallery-nav:disabled:hover {
    transform: translateY(-50%) scale(1);
}

.gallery-next {
    right: 10px;
}

.gallery-prev {
    left: 10px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
}

.project-tech span {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-tech span:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Interest Section */
.interest {
    padding: 6rem 0;
    background: var(--bg-tertiary);
}

@media (max-width: 768px) {
    .interest {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {
    .interest {
        padding: 3rem 0;
    }
}

.container-interest {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

.interest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.interest-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.interest-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.interest-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--bg-primary);
    margin: 0 auto 1.5rem;
    transition: transform 0.3s ease;
}

.interest-card:hover .interest-icon {
    transform: scale(1.1);
}

.interest-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.interest-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: justify;
}

.interest-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
    display: block;
    text-align: left;
    font-size: 1rem;
    width: fit-content;
}

.interest-link:hover {
    color: var(--secondary-color);
    border-bottom: 1px solid var(--secondary-color);
    text-decoration: none;
}

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;      /* Vertical centering */
    padding: 40px;            /* Leave space on all sides */
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}



.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 1rem 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 1);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}



.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--bg-primary);
    flex-shrink: 0;
}

.contact-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.contact-item p {
    color: var(--text-secondary);
}

.contact-link {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.contact-link:hover {
    transform: scale(1.1);
}

.contact-link i {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--bg-primary);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.contact-link:hover i {
    background: var(--primary-color);
    color: var(--bg-primary);
    box-shadow: var(--shadow);
}

.contact-text-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-text-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.phone-copy {
    cursor: pointer;
}

.phone-copy:hover {
    cursor: pointer;
}

.wechat-copy {
    cursor: pointer;
}

.wechat-copy:hover {
    cursor: pointer;
}



/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer p {
    color: var(--text-muted);
}



/* Responsive Design */

/* Medium screens */
@media (max-width: 1024px) {
    .hero-container {
        gap: 3rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .profile-image {
        width: 400px;
        height: 400px;
    }

    .timeline-content {
        padding: 1.8rem;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .education-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .interest-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
    }

    .language-switcher {
        display: none;
    }

    /* Mobile Navigation */
    .mobile-nav {
        display: flex;
        min-height: 320px;
        padding: 75px 15px 30px 15px;
        min-width: 180px;
        max-width: 250px;
    }

    .mobile-language-switcher {
        display: flex;
    }

    /* Hero Section */
    .hero {
        padding-top: 90px;
        min-height: auto;
        padding-bottom: 3rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.6;
        text-align: left;
        margin-bottom: 1.5rem;
    }
    
    .hero-info {
        justify-content: center;
        gap: 0.8rem;
        flex-wrap: wrap;
    }
    
    .hero-contact {
        max-width: 100%;
        gap: 1rem;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .info-item {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
        flex: 1 1 calc(50% - 0.4rem);
        min-width: 140px;
    }

    .contact-item {
        flex-direction: row;
        text-align: left;
        gap: 1rem;
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 140px;
        align-items: flex-start;
    }

    .contact-item h3 {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }

    .contact-item p {
        font-size: 0.9rem;
    }

    .profile-image {
        width: 400px;
        height: 400px;
        margin: 0 auto;
    }

    /* Timeline */
    .timeline {
        padding: 0 15px;
        text-align: left;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-content {
        width: calc(100% - 50px);
        margin-left: 50px;
        padding: 1.5rem;
        min-width: 0; /* Prevent content overflow */
        overflow: hidden; /* Prevent content overflow */
        text-align: left;
    }

    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 50px;
        margin-top: 0;
    }

    .timeline-item:nth-child(odd):not(:first-child) .timeline-content {
        margin-top: 0;
    }

    .timeline-content::before {
        left: -35px !important;
    }

    .timeline-content h3 {
        font-size: 1.2rem;
    }

    .timeline-content h4 {
        font-size: 1rem;
    }

    .timeline-content ul {
        text-align: left;
    }

    .timeline-content .timeline-description {
        text-align: left;
    }

    /* Skills */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skill-category {
        padding: 1.5rem;
    }

    .category-header h3 {
        font-size: 1.2rem;
    }

    .skill-item span {
        font-size: 0.9rem;
        width: 200px;
    }

    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        min-width: 0; /* Prevent grid overflow */
        width: 100%;
        max-width: 100%;
    }

    .project-card {
        padding: 1.5rem;
    }

    .project-content h3 {
        font-size: 1.2rem;
    }

    .project-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .project-tech {
        gap: 0.4rem;
    }

    .project-tech span {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }

    /* Education */
    .education-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .education-card {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .education-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    /* Hide education icon on mobile */
    .education-icon {
        display: none;
    }

    /* Adjust education card layout when icon is hidden */
    .education-card {
        justify-content: center;
        text-align: center;
    }

    /* Interest */
    .interest-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .interest-card {
        padding: 1.5rem;
    }

    .interest-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    /* Gallery */
    .gallery-thumbnail {
        width: 120px;
        height: 80px;
    }

    .gallery-nav {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    /* Footer */
    .footer-content {
        text-align: center;
    }
}

@media (max-width: 480px) {
    /* Global width control */
    * {
        max-width: 100vw;
        box-sizing: border-box;
    }

    /* General */
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
        text-align: left;
    }

    /* Mobile Navigation */
    .mobile-nav {
        width: auto;
        min-width: 160px;
        max-width: 220px;
        min-height: 280px;
        padding: 70px 12px 25px 12px;
    }

    .mobile-nav a {
        font-size: 1rem;
        padding: 0.5rem 0.6rem;
    }

    .mobile-nav-close {
        top: 15px;
        right: 15px;
        font-size: 1.5rem;
    }

    .container, .container-skills, .container-education, .container-projects, .container-interest {
        padding: 0 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Hero Section */
    .hero {
        padding-top: 80px;
        padding-bottom: 2rem;
    }

    .hero-container {
        padding: 0 10px;
        gap: 1.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .hero-info {
        gap: 0.6rem;
    }

    .info-item {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
        flex: 1 1 100%;
        min-width: auto;
    }

    .hero-contact {
        gap: 0.8rem;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .contact-item {
        gap: 0.3rem;
        flex: 1 1 calc(50% - 0.4rem);
        min-width: 120px;
    }

    .contact-item h3 {
        font-size: 0.9rem;
    }

    .contact-item p {
        font-size: 0.8rem;
    }

    .profile-image {
        width: 240px;
        height: 240px;
    }

    /* Timeline */
    .timeline {
        padding: 0 10px;
        text-align: left;
    }

    .timeline-content {
        padding: 1rem;
        margin-left: 40px;
        width: calc(100% - 40px);
        min-width: 0; /* Prevent content overflow */
        overflow: hidden; /* Prevent content overflow */
        text-align: left;
    }

    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 40px;
    }

    .timeline::before {
        left: 15px;
    }

    .timeline-content::before {
        left: -30px !important;
        width: 15px;
        height: 15px;
    }

    .timeline-content h3 {
        font-size: 1.1rem;
    }

    .timeline-content h4 {
        font-size: 0.9rem;
    }

    .timeline-date {
        font-size: 0.9rem;
    }

    .timeline-content ul {
        text-align: left;
    }

    .timeline-content .timeline-description {
        text-align: left;
    }

    /* Skills */
    .skill-category {
        padding: 1rem;
    }

    .category-header h3 {
        font-size: 1.1rem;
    }

    .skill-item span {
        font-size: 0.8rem;
        width: 150px;
    }

    .skill-bar {
        max-width: 150px;
    }

    /* Projects */
    .project-card {
        padding: 1rem;
        min-width: 0; /* Prevent card overflow */
        overflow: hidden; /* Prevent content overflow */
        width: 100%;
        max-width: 100%;
    }

    .projects-grid {
        min-width: 0; /* Prevent grid overflow */
        width: 100%;
        max-width: 100%;
    }

    .project-tech {
        gap: 0.3rem;
    }

    .project-tech span {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .project-content h3 {
        font-size: 1.1rem;
    }

    .project-content p {
        font-size: 0.9rem;
    }

    .project-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .project-content li {
        font-size: 0.9rem;
    }

    /* Education */
    .education-card {
        padding: 1rem;
    }

    /* Hide education icon on small mobile */
    .education-icon {
        display: none;
    }

    /* Adjust education card layout for small mobile */
    .education-card {
        justify-content: center;
        text-align: center;
        padding: 1.2rem;
    }

    .education-content h2 {
        font-size: 1.2rem;
    }

    .education-content h3 {
        font-size: 1rem;
    }

    .education-university {
        font-size: 1rem;
    }

    .education-date {
        font-size: 1rem;
    }

    .education-location {
        font-size: 1rem;
    }

    /* Interest */
    .interest-card {
        padding: 1rem;
    }

    .interest-content h3 {
        font-size: 1.1rem;
    }

    .interest-content p {
        font-size: 0.9rem;
    }

    /* Gallery */
    .gallery-thumbnail {
        width: 100px;
        height: 70px;
    }

    .gallery-nav {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    /* Navigation */
    .nav-container {
        padding: 0 10px;
    }

    .nav-logo h2 {
        font-size: 1.5rem;
    }
} 

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 50px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.lang-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.mobile-language-switcher {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.mobile-language-switcher .lang-btn {
    width: 100%;
    text-align: center;
    padding: 0.8rem;
    font-size: 1rem;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
} 