:root {
    --primary-color: #333333;
    --secondary-color: #1A365D; /* Navy Blue */
    --accent-color: #C8102E; /* Red */
    --text-color: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --bg-color: #ffffff;
    --bg-light: #f5f5f5;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --nav-height: 70px;
    --gradient-hero: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --gradient-card: linear-gradient(to bottom right, #ffffff, #f7fafc);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: clamp(3rem, 8vw, 5rem) 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.section-title {
    font-size: clamp(1.6rem, 4vw, 2rem);
    font-weight: 600;
    text-align: center;
    margin-bottom: clamp(1.5rem, 4vw, 3rem);
    position: relative;
    padding-bottom: 15px;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    gap: 8px;
}
.btn:active {
    transform: scale(0.98);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.15);
}

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

.btn-primary:hover {
    background-color: #122844;
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #a00d25;
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
}
.navbar.scrolled {
    backdrop-filter: blur(12px);
    background-color: rgba(255, 255, 255, 0.98);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-color);
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--secondary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    padding-top: calc(var(--nav-height) + 60px);
    padding-bottom: 80px;
    background: var(--gradient-hero);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.badge {
    font-size: 1rem;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    vertical-align: middle;
    font-weight: normal;
}

.subtitle {
    font-size: 1.4rem;
    color: var(--text-light);
    margin-bottom: 20px;
    font-weight: 500;
}

.summary {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.avatar-container {
    width: 280px;
    height: 380px;
    background-color: #ddd;
    border-radius: var(--border-radius);
    box-shadow: 12px 12px 0 rgba(26, 54, 93, 0.15);
    position: relative;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #e0e0e0;
    color: #888;
}

.img-placeholder i {
    margin-bottom: 15px;
    color: #999;
}

/* Profile Section */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0;
}

.overview-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.2fr 1fr;
    gap: 24px;
    align-items: stretch;
}
.overview-grid > div {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.overview-grid .advantages-container {
    margin-bottom: 0;
    grid-template-columns: 1fr;
    gap: 16px;
}
.overview-grid .certs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.profile-info-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    height: fit-content;
    max-width: 640px;
    width: 100%;
}

.overview-grid .profile-info-card {
    height: 100%;
}

.profile-info-card h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-list li {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #eee;
    padding-bottom: 8px;
}

.info-list li:last-child {
    border-bottom: none;
}

.timeline-container h3 {
    margin-bottom: 25px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid #e0e0e0;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 20px;
}

.timeline-dot {
    position: absolute;
    left: -26px;
    top: 5px;
    width: 14px;
    height: 14px;
    background-color: var(--white);
    border: 3px solid var(--secondary-color);
    border-radius: 50%;
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--text-lighter);
    margin-bottom: 5px;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
}

/* Work Experience */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.job-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    transition: var(--transition);
    border-top: 4px solid var(--secondary-color);
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.job-header {
    margin-bottom: 20px;
}

.job-header h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.job-time {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.job-duties {
    margin-bottom: 20px;
}

.job-duties h4, .job-achievements h4 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.job-duties ul {
    list-style-type: disc;
    padding-left: 20px;
    color: var(--text-color);
}

.job-duties li {
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.job-achievements {
    background-color: #fff5f5;
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid var(--accent-color);
}

.job-achievements p {
    font-size: 0.95rem;
    color: #555;
}

/* Skills & Advantages */
.advantages-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

.advantage-card {
    background: var(--gradient-card);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.adv-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(26, 54, 93, 0.1);
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.adv-content h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.adv-content p {
    font-size: 0.95rem;
    color: var(--text-light);
}

.skills-tabs {
    background: var(--gradient-card);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.tab-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.tab-btn {
    background: #f0f0f0;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-light);
    transition: var(--transition);
}

.tab-btn.active, .tab-btn:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.skill-bar-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.skill-item {
    margin-bottom: 15px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
}

.progress-bg {
    width: 100%;
    height: 10px;
    background-color: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--secondary-color);
    border-radius: 5px;
    width: 0;
    transition: width 1s ease-in-out;
}

/* Dynamic Width Classes will be handled by JS or predefined if static */
.fill-98 { width: 98%; }
.fill-95 { width: 95%; }
.fill-90 { width: 90%; }
.fill-88 { width: 88%; }
.fill-86 { width: 86%; }
.fill-85 { width: 85%; }
.fill-80 { width: 80%; }
.fill-75 { width: 75%; }
.fill-72 { width: 72%; }
.fill-70 { width: 70%; }
.fill-65 { width: 65%; }
.fill-60 { width: 60%; }
.fill-55 { width: 55%; }

/* Education */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.edu-card {
    background: var(--gradient-card);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
}

.edu-icon {
    width: 60px;
    height: 60px;
    background-color: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.edu-info h3 {
    margin-bottom: 5px;
    color: var(--primary-color);
}

.edu-degree {
    color: var(--text-color);
    margin-bottom: 5px;
}

.edu-time {
    color: var(--text-lighter);
    font-size: 0.9rem;
}

/* Honors & Certificates */
.honors-container {
    margin-bottom: 50px;
}

.honors-container h3, .certificates-container h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.honors-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.honor-tag {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.honor-tag:hover {
    transform: scale(1.05);
}

.honor-tag.highlight {
    background-color: #a00d25;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(200, 16, 46, 0.3);
}

.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.cert-card {
    background: var(--gradient-card);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid #eee;
}

.cert-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
}

.cert-icon {
    font-size: 2.5rem;
    color: var(--text-lighter);
    margin-bottom: 15px;
}

.cert-card h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.cert-card p {
    font-size: 0.8rem;
    color: var(--text-light);
}

.cert-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 54, 93, 0.9);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.cert-card:hover .cert-hover {
    opacity: 1;
}

/* Footer */
.footer {
    background-color: #2d3748;
    color: var(--white);
    padding: 60px 0 20px;
    text-align: center;
}

.footer-title {
    margin-bottom: 40px;
    font-size: 1.5rem;
}

.contact-grid {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.contact-item i {
    font-size: 1.5rem;
    color: #a0aec0;
    transition: var(--transition);
}

.contact-item:hover i {
    color: var(--white);
}

.copy-text {
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px dashed #666;
}

.copy-text:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.footer-actions {
    margin-bottom: 40px;
}

.copyright {
    border-top: 1px solid #4a5568;
    padding-top: 20px;
    color: #a0aec0;
    font-size: 0.9rem;
}

.deploy-info {
    margin-top: 5px;
    font-size: 0.8rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    position: relative;
    text-align: center;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-placeholder {
    padding: 50px;
    color: #666;
}

.modal-placeholder i {
    color: #ccc;
    margin-bottom: 20px;
}

/* Toast */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 16px;
    position: fixed;
    z-index: 3000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 17px;
}

.toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 30px; opacity: 1;}
}

@keyframes fadeout {
    from {bottom: 30px; opacity: 1;}
    to {bottom: 0; opacity: 0;}
}

/* Responsive */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
    }
    
    .hero-section {
        padding-bottom: 60px;
    }
    
    .hero-text h1 {
        justify-content: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .advantages-container {
        grid-template-columns: 1fr;
    }
    .overview-grid {
        grid-template-columns: 1fr 1fr;
    }
    .overview-grid .certs-grid {
        grid-template-columns: 1fr;
    }
    
    .avatar-container {
        width: 240px;
        height: 320px;
        box-shadow: var(--shadow);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        transform: translateY(-10px);
        opacity: 0;
        transition: var(--transition);
    }
    
    .nav-links.active {
        display: flex;
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-links li {
        margin: 15px 0;
        text-align: center;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero-text h1 {
        font-size: 2rem;
        flex-direction: column;
    }
    
    .badge {
        margin-top: 10px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .section-title {
        font-size: 22px;
        margin-bottom: 30px;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .summary {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .contact-grid {
        flex-direction: column;
        gap: 30px;
    }

    .experience-grid, .education-grid {
        grid-template-columns: 1fr;
    }
    
    .advantage-card {
        padding: 20px;
    }
    
    .skills-tabs {
        padding: 20px;
    }
    
    .tab-buttons {
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .edu-card {
        padding: 20px;
    }
    
    .cert-card {
        padding: 16px;
    }
    
    .certs-grid {
        grid-template-columns: 1fr;
    }
    .overview-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .overview-grid .advantages-container {
        gap: 12px;
    }
}

.back-to-top {
    position: fixed;
    right: 16px;
    bottom: 20px;
    width: 44px;
    height: 44px;
    border-radius: 22px;
    background-color: var(--secondary-color);
    color: var(--white);
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    z-index: 1500;
}
.back-to-top.show {
    display: flex;
}

:focus-visible {
    outline: 3px solid rgba(26, 54, 93, 0.35);
    outline-offset: 2px;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    color: var(--white);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.modal-nav.prev { left: 10px; }
.modal-nav.next { right: 10px; }
.modal-img {
    transition: transform 0.3s ease;
}
.modal-img.zoomed {
    transform: scale(1.15);
}
.mask-layer {
    position: absolute;
    pointer-events: none;
}
.mask-rect {
    position: absolute;
    backdrop-filter: blur(7px);
    background-color: rgba(255,255,255,0.15);
    border-radius: 4px;
}
