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

:root {
    --bg-body: #121212;
    --bg-dark: #0a0a0a;
    --bg-darker: #0a0a0a;
    --bg-card: #1a1a1a;
    --bg-card-border: #2a2a2a;
    --border-color: #1a1a1a;
    --text-white: #ffffff;
    --text-gray-light: #a0a0a0;
    --text-gray-medium: #707070;
    --text-gray-dark: #555555;
    --text-gray-darkest: #666666;
    --primary-orange: #ff6b26;
    --primary-cyan: #00c8d7;
    --primary-green: #7cff42;
    --primary-yellow: #d4ff42;
    --icon-dark: #2a2a2a;
}

[data-theme="light"] {
    --bg-body: #f5f5f5;
    --bg-dark: #ffffff;
    --bg-darker: #f8f8f8;
    --bg-card: #ffffff;
    --bg-card-border: #e5e5e5;
    --border-color: #e5e5e5;
    --text-white: #1a1a1a;
    --text-gray-light: #333333;
    --text-gray-medium: #666666;
    --text-gray-dark: #777777;
    --text-gray-darkest: #555555;
    --primary-orange: #ff6b26;
    --primary-cyan: #009eb0;
    --primary-green: #5cb32d;
    --primary-yellow: #a0b800;
    --icon-dark: #cccccc;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container & Layout */
.container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    background-color: var(--bg-dark);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .container {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
}

/* Sidebar */
.sidebar {
    width: 300px;
    background-color: var(--bg-darker);
    border-right: 1px solid var(--border-color);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
}

/* Right Column (contains main-header and main-content) */
.right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-dark);
}

/* Main Header */
.main-header {
    padding: 48px 32px 0 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: auto;
}

.theme-toggle:hover {
    background-color: var(--bg-card-border);
    transform: scale(1.05);
}

.theme-icon {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-icon.moon {
    opacity: 1;
    transform: rotate(0deg);
}

.theme-icon.sun {
    opacity: 0;
    transform: rotate(-90deg);
}

[data-theme="light"] .theme-icon.moon {
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="light"] .theme-icon.sun {
    opacity: 1;
    transform: rotate(0deg);
}

.position-tag {
    color: var(--primary-orange);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sidebar-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-white);
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header svg {
    flex-shrink: 0;
}

.section-title {
    color: var(--primary-orange);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.section-text {
    color: var(--text-gray-light);
    font-size: 14px;
    line-height: 1.6;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-label {
    color: var(--text-gray-medium);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.contact-value {
    color: var(--text-white);
    font-size: 14px;
}

.contact-link {
    color: var(--primary-orange);
    /* text-decoration: none; */
    font-size: 14px;
    transition: opacity 0.2s ease;
}

.contact-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Stats Cards */
.stats-container {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.stat-card {
    flex: 1;
    background-color: var(--bg-card);
    border-radius: 4px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-bar {
    width: 4px;
    height: 100%;
    min-height: 40px;
    border-radius: 2px;
}

.stat-bar.orange {
    background-color: var(--primary-orange);
}

.stat-bar.cyan {
    background-color: var(--primary-cyan);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-gray-medium);
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 48px 32px 48px 32px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.name-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.name-avatar {
    position: relative;
    object-fit: cover;
    overflow: hidden;
    width: 60px;
    aspect-ratio: 1/1;
    border-radius: 12px;
}

.name-first,
.name-last {
    font-size: 80px;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;
    margin: 0;
}

.name-first {
    color: var(--text-white);
}

.name-last {
    color: var(--primary-orange);
}

.header-icon {
    flex-shrink: 0;
}

.job-title {
    color: var(--text-gray-darkest);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
}

/* Section */
.main-content-section {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.main-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-content-header-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-white);
    margin: 0;
    text-transform: uppercase;
}

.version-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.expertise-label {
    color: var(--primary-orange);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.version-number {
    color: var(--text-gray-dark);
    font-size: 12px;
}

.competency-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.block-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.block-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.block-icon svg {
    flex-shrink: 0;
}

.block-icon.cyan {
    background-color: rgba(0, 200, 215, 0.1);
}

.block-icon.orange {
    background-color: rgba(255, 107, 38, 0.1);
}

.block-icon.green {
    background-color: rgba(124, 255, 66, 0.1);
}

.block-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-white);
    margin: 0;
    text-transform: uppercase;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.tag-dark {
    background-color: var(--bg-card);
    color: var(--text-white);
}

.tag-orange {
    background-color: var(--primary-orange);
    color: var(--text-white);
}

[data-theme="light"] .tag-orange {
    color: #ffffff;
}

.cards-container {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.accreditation-card {
    flex: 1;
    min-width: 200px;
    background-color: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 6px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.2s ease;
}

.accreditation-card:hover {
}

.accreditation-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.accreditation-title.orange {
    color: var(--primary-orange);
}

.accreditation-title.cyan {
    color: var(--primary-cyan);
}

.accreditation-title.yellow {
    color: var(--primary-yellow);
}

.accreditation-subtitle {
    font-size: 12px;
    color: var(--text-gray-medium);
    margin: 0;
    font-weight: 500;
}

.accreditation-desc {
    font-size: 13px;
    color: var(--text-gray-light);
    margin: 0;
}

/* Footer */
.footer-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-green);
    border-radius: 50%;
}

.status-text {
    font-size: 12px;
    color: var(--text-gray-medium);
    font-weight: 500;
}

.page-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-number,
.page-total {
    font-size: 12px;
    color: var(--text-gray-dark);
    font-weight: 500;
}

.page-divider {
    font-size: 12px;
    color: var(--text-gray-medium);
}

/* Responsive Design - Tablet */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }

    .right-column {
        width: 100%;
    }

    .main-header {
        padding: 32px 24px 0 24px;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-top: 1px solid var(--border-color);
        padding: 24px;
    }

    .main-content {
        padding: 0 24px 32px 24px;
    }

    .name-first,
    .name-last {
        font-size: 60px;
    }

    .competencies-title {
        font-size: 28px;
    }

    .cards-container {
        flex-direction: column;
    }

    .accreditation-card {
        min-width: 100%;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 640px) {
    .container {
        flex-direction: column;
    }

    .right-column {
        display: contents;
    }

    /* Header在最前面 */
    .main-header {
        order: 1;
        padding: 24px 16px;
        padding-bottom: 16px;
    }

    /* Sidebar在第二 */
    .sidebar {
        order: 2;
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-top: 1px solid var(--border-color);
        padding: 24px 16px;
        gap: 24px;
    }

    /* Main-content在最后 */
    .main-content {
        order: 3;
        padding: 24px 16px;
        gap: 32px;
    }

    .sidebar-title {
        font-size: 24px;
    }

    .name-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .name-avatar {
        display: none;
    }

    .header-icon {
        order: -1;
    }

    .name-first,
    .name-last {
        font-size: 72px;
    }

    .competencies-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .competencies-title {
        font-size: 24px;
    }

    .stats-container {
        flex-direction: row;
    }

    .stat-card {
        padding: 16px;
        min-height: 50px;
    }

    .footer-status {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: transparent;
}

::-webkit-scrollbar-thumb:hover {
    background: transparent;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 0;
}

.timeline-entry {
    position: relative;
    margin-bottom: 48px;
    padding-left: 0;
}

.timeline-entry::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 12px;
    bottom: -20px;
    width: 2px;
    background-color: var(--text-gray-dark);
}

.timeline-entry:first-child::before {
    background-color: var(--primary-orange);
}

.timeline-entry:last-child {
    margin-bottom: 0;
}

.timeline-entry:last-child::before {
    display: none;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 4px;
    width: 16px;
    height: 16px;
    background-color: var(--text-gray-dark);
    border-radius: 50%;
    border: 3px solid var(--bg-dark);
    z-index: 1;
}

.timeline-entry:first-child .timeline-dot {
    background-color: var(--primary-orange);
}

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 30px;
}

.job-position {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-white);
    margin: 0;
}

.company-location {
    font-size: 16px;
    color: var(--primary-orange);
    font-weight: 500;
}

.time-badge {
    display: inline-block;
    background-color: var(--bg-card);
    color: var(--text-white);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    align-self: flex-start;
}

.job-description {
    position: relative;
    margin-bottom: 8px;
    color: var(--text-gray-light);
    font-size: 15px;
    line-height: 1.6;
}

.job-duties {
    list-style: none;
    padding: 0;
    margin: 0;
}

.job-duties li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: var(--text-gray-light);
    font-size: 15px;
    line-height: 1.6;
}

.job-duties li:last-child {
    margin-bottom: 0;
}

.job-duties li::before {
    content: '▶';
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 10px;
    color: var(--primary-orange);
}

/* Responsive Design for Work History */
@media (max-width: 1024px) {
    .work-history-title {
        font-size: 28px;
    }

    .timeline {
        padding-left: 0;
    }

    .timeline-entry::before {
        left: 7px;
    }

    .timeline-content {
        padding-left: 28px;
    }
}

@media (max-width: 640px) {
    .work-history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .work-history-title {
        font-size: 24px;
    }

    .timeline {
        padding-left: 0;
    }

    .timeline-entry {
        margin-bottom: 40px;
    }

    .timeline-entry::before {
        left: 5px;
    }

    .timeline-dot {
        width: 12px;
        height: 12px;
        top: 5px;
        left: 0;
    }

    .timeline-content {
        padding-left: 24px;
    }
}

    .job-position {
        font-size: 18px;
    }

    .company-location {
        font-size: 14px;
    }

    .job-duties li {
        font-size: 14px;
    }
}

/* Portfolio Styles */
.portfolio-list {
    display: flex;
    flex-direction: column;
}

.portfolio-card {
    display: flex;
    gap: 20px;
    align-items: stretch;
    background-color: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 32px;
    transition: transform 0.2s ease;
}

.portfolio-card:last-child {
    margin-bottom: 0;
}

.portfolio-card:hover {
    border-color: var(--primary-orange);
}

.portfolio-image-wrapper {
    position: relative;
    width: 160px;
    min-height: 100px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    /* background-color: var(--bg-darker); */
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-darker) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    min-height: 100px;
}

.portfolio-card:hover .portfolio-image {
    transform: scale(1.05);
}

.portfolio-image-placeholder {
    width: 100%;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-darker) 100%);
}

.portfolio-image-placeholder svg {
    opacity: 0.5;
}

.portfolio-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
}

.portfolio-tag.beta {
    background-color: var(--primary-orange);
    color: #ffffff;
}

.portfolio-tag.stable {
    background-color: var(--primary-green);
    color: #1a1a1a;
}

.portfolio-tag.wip {
    background-color: var(--primary-cyan);
    color: #1a1a1a;
}

[data-theme="light"] .portfolio-tag.beta {
    color: #ffffff;
}

[data-theme="light"] .portfolio-tag.stable {
    color: #ffffff;
}

[data-theme="light"] .portfolio-tag.wip {
    color: #ffffff;
}

[data-theme="light"] .sidebar {
    background-color: #f8f8f8;
    border-right-color: #e5e5e5;
}

[data-theme="light"] .sidebar-title {
    color: #1a1a1a;
}

[data-theme="light"] .section-title {
    color: #ff6b26;
}

[data-theme="light"] .section-text {
    color: #333333;
}

[data-theme="light"] .contact-label {
    color: #999999;
}

[data-theme="light"] .stat-label {
    color: #999999;
}

[data-theme="light"] .accreditation-subtitle {
    color: #999999;
}

[data-theme="light"] .version-number {
    color: #999999;
}

[data-theme="light"] .status-text {
    color: #999999;
}

[data-theme="light"] .job-title {
    color: #999999;
}

[data-theme="light"] .contact-value {
    color: #1a1a1a;
}

[data-theme="light"] .main-content-header-title {
    color: #1a1a1a;
}

[data-theme="light"] .portfolio-title {
    color: #1a1a1a;
}

[data-theme="light"] .job-position {
    color: #1a1a1a;
}

[data-theme="light"] .company-location {
    color: #ff6b26;
}

.portfolio-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.portfolio-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-white);
    margin: 0;
}

.portfolio-time {
    font-size: 13px;
    color: var(--primary-orange);
    font-weight: 500;
}

.portfolio-description {
    font-size: 14px;
    color: var(--text-gray-light);
    line-height: 1.5;
    margin: 0;
}

.role-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.role-list li {
    font-size: 13px;
    color: var(--text-gray-light);
    line-height: 1.5;
    position: relative;
    padding-left: 16px;
}

.role-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-orange);
}

/* Common */


.text-orange {
    color: var(--primary-orange);
}

.text-cyan {
    color: var(--primary-cyan);
}

.text-green {
    color: var(--primary-green);
}

.text-yellow {
    color: var(--primary-yellow);
}

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

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

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

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

/* Responsive Design for Portfolio */
@media (max-width: 1024px) {
    .portfolio-card {
        flex-direction: row;
        gap: 16px;
    }

    .portfolio-image-wrapper {
        width: 140px;
        min-height: 90px;
    }

    .portfolio-title {
        font-size: 16px;
    }

    .portfolio-description,
    .portfolio-role {
        font-size: 13px;
    }
}

@media (max-width: 640px) {
    .portfolio-card {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .portfolio-image-wrapper {
        width: 100%;
        min-height: 160px;
    }

    .portfolio-title {
        font-size: 16px;
    }

    .portfolio-time {
        font-size: 12px;
    }

    .portfolio-description,
    .portfolio-role {
        font-size: 13px;
    }

    .role-list {
        gap: 6px;
    }

    .role-list li {
        font-size: 13px;
    }
}

/* Light Theme Specific Adjustments */
[data-theme="light"] .tag-dark {
    background-color: #f0f0f0;
    color: #1a1a1a;
}

[data-theme="light"] .time-badge {
    background-color: #f0f0f0;
    color: #1a1a1a;
}

[data-theme="light"] .accreditation-card {
    border-color: #e5e5e5;
}

[data-theme="light"] .accreditation-card:hover {
}

[data-theme="light"] .portfolio-card {
    border-color: #d0d0d0;
}

[data-theme="light"] .portfolio-card:hover {
    border-color: #ff6b26;
}

[data-theme="light"] .stat-card {
    border: 1px solid #e5e5e5;
    background-color: #ffffff;
}

[data-theme="light"] .timeline-dot {
    border-color: #ffffff;
}

[data-theme="light"] .job-duties li::before {
    color: #ff6b26;
}

[data-theme="light"] .role-list li::before {
    color: #ff6b26;
}

/* Print Styles */
@media print {
    .stats-container {
        margin-top: unset;
    }
    .language-button {
        display: none;
    }
}
