/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@property --tag-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@property --contact-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

:root {
    /* 暗色主题变量 */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-primary: #d946ef;
    --accent-secondary: #f472b6;
    --border-color: #334155;
    --card-bg: rgba(30, 41, 59, 0.8);
}

[data-theme="light"] {
    /* 浅色主题变量 */
    --bg-primary: #f6f8fc;
    --bg-secondary: #edf2f8;
    --bg-tertiary: #dce5f1;
    --text-primary: #17233a;
    --text-secondary: #5d6b82;
    --accent-primary: #6d28d9;
    --accent-secondary: #db2777;
    --border-color: #d6e0ed;
    --card-bg: rgba(255, 255, 255, 0.9);
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    transition: all 0.3s ease;
}

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

/* 主题切换按钮 */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* 深色主题下提高主题按钮的可见度 */
[data-theme="dark"] .theme-toggle {
    color: #fef08a;
    background: rgba(30, 41, 59, 0.96);
    border-color: rgba(249, 168, 212, 0.8);
    box-shadow: 0 0 0 1px rgba(244, 114, 182, 0.18), 0 0 22px rgba(217, 70, 239, 0.3), 0 6px 18px rgba(2, 6, 23, 0.35);
}

[data-theme="dark"] .theme-toggle:hover {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(217, 70, 239, 0.9), rgba(59, 130, 246, 0.9));
    border-color: #fef08a;
    box-shadow: 0 0 0 3px rgba(254, 240, 138, 0.12), 0 0 28px rgba(244, 114, 182, 0.6), 0 8px 22px rgba(2, 6, 23, 0.4);
}

.theme-toggle:focus-visible {
    outline: 3px solid #fef08a;
    outline-offset: 4px;
}

/* 导航栏 */
.navbar {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.nav-brand h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-brand p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

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

.nav-language {
    display: flex;
    align-items: center;
}

.language-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    padding: 0.34rem 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-secondary) !important;
    background: color-mix(in srgb, var(--card-bg) 72%, transparent);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    line-height: 1;
    text-decoration: none !important;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.nav-menu .language-switch::after {
    display: none;
}

.language-switch:hover,
.language-switch:focus-visible {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-color: transparent;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--accent-primary) 24%, transparent);
    transform: translateY(-1px);
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: var(--accent-primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.3s ease;
}

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

@media (max-width: 1100px) and (min-width: 769px) {
    .nav-menu {
        gap: 0.9rem;
    }

    .nav-menu a {
        font-size: 0.86rem;
    }

    .nav-brand p {
        max-width: 19rem;
        font-size: 0.76rem;
        line-height: 1.25;
    }
}

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

/* 英雄区域 */
.hero {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    padding: 12rem 0 8rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(52, 152, 219, 0.1), transparent 70%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    display: inline-block;
    background: linear-gradient(135deg, #f472b6, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-breathing 10s ease-in-out infinite;
    background-size: 200% 200%;
    position: relative;
    z-index: 10;
}

/* 浅色主题下的渐变 */
[data-theme="light"] .hero h2 {
    background: linear-gradient(135deg, #9333ea, #db2777);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    opacity: 0.9;
}

.hero-eyebrow {
    color: var(--accent-secondary) !important;
    font-size: 0.95rem !important;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 1.25rem !important;
}

.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.9rem;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.04);
}

.btn-secondary:hover {
    color: var(--accent-secondary);
    border-color: var(--accent-secondary);
    transform: translateY(-2px);
}

/* 通用部分样式 */
.section {
    padding: 6rem 0;
    position: relative;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    margin: 1rem auto 0;
}

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

/* 关于我 */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.about-text .lead {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.5;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.tag-row span {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--accent-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
    transition: color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.tag-row span:hover,
.tag-row span.is-active,
.tag-row span:focus-visible {
    color: var(--text-primary);
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box, conic-gradient(from var(--tag-angle, 0deg), #ef4444, #f59e0b, #facc15, #22c55e, #06b6d4, #3b82f6, #8b5cf6, #ec4899, #ef4444) border-box;
    box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.08), 0 6px 18px rgba(109, 40, 217, 0.14);
    transform: translateY(-2px);
    animation: rainbow-tag-ring 3.2s linear infinite;
}

.tag-row span:focus-visible {
    outline: 3px solid rgba(96, 165, 250, 0.45);
    outline-offset: 3px;
}

@keyframes rainbow-tag-ring {
    from { --tag-angle: 0deg; }
    to { --tag-angle: 360deg; }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 3.5rem;
}

.stats-card {
    padding: 1.35rem 1rem;
    text-align: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.stats-card strong,
.stats-card span {
    display: block;
}

.stats-card strong {
    margin-bottom: 0.35rem;
    color: var(--accent-secondary);
    font-size: 1.65rem;
}

.stats-card span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.stats-card {
    cursor: pointer;
    transition: color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.stats-card:hover,
.stats-card.is-active,
.stats-card:focus-visible {
    border: 2px solid transparent;
    background: linear-gradient(var(--card-bg), var(--card-bg)) padding-box, conic-gradient(from var(--tag-angle, 0deg), #ef4444, #f59e0b, #facc15, #22c55e, #06b6d4, #3b82f6, #8b5cf6, #ec4899, #ef4444) border-box;
    box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.08), 0 12px 26px rgba(109, 40, 217, 0.14);
    transform: translateY(-5px);
    animation: rainbow-tag-ring 3.2s linear infinite;
}

.stats-card:focus-visible {
    outline: 3px solid rgba(96, 165, 250, 0.45);
    outline-offset: 3px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-label {
    font-weight: 600;
    color: var(--text-primary);
}

.info-value {
    color: var(--text-secondary);
}

/* 核心技能 */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #f472b6, #3b82f6);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.skill-category h3::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 20px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    margin-right: 0.8rem;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-primary);
}

.skill-list li::before {
    content: '✓';
    display: inline-block;
    color: var(--accent-primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* 工作经历 */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #f472b6, #a855f7);
    z-index: 1;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 2rem;
}

.timeline-item::before {
    display: none;
}

.timeline-item::after {
    display: none;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-date {
    width: 100%;
    text-align: left;
    padding-right: 0;
    font-weight: 600;
    color: #f472b6;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.timeline-item:nth-child(odd) .timeline-date {
    text-align: left;
    padding-right: 0;
    padding-left: 0;
    justify-content: flex-start;
}

.timeline-content {
    width: 100%;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: none;
    border-left: 0;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    box-shadow: none !important;
    border-radius: 0 8px 8px 8px;
}

.timeline-content:hover {
    transform: translateX(5px);
}

.timeline-item:nth-child(odd) .timeline-content {
    border: none;
    border-right: 0;
}

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

.company {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1rem;
}

.timeline-content ul {
    list-style: none;
    padding-left: 0;
}

.timeline-content li {
    padding: 0.3rem 0;
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-primary);
}

.timeline-content li::before {
    content: '•';
    display: inline-block;
    color: var(--accent-primary);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.5rem;
    line-height: 1;
}

/* 项目案例 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #f472b6, #3b82f6, #a855f7);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.project-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-kicker {
    display: block;
    margin-bottom: 0.7rem;
    color: var(--accent-secondary);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

.project-card p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    flex-grow: 1;
}

.project-outcome {
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags span {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* 个人使用说明书 */
.manual-content {
    max-width: 800px;
    margin: 0 auto;
}

.manual-section {
    background: var(--card-bg);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 4px solid transparent;
    border-image: linear-gradient(180deg, #f472b6, #a855f7) 1;
    transition: all 0.3s ease;
}

.manual-section:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.manual-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.manual-section h3::before {
    margin-right: 0.8rem;
}

.manual-section p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.manual-section ul {
    list-style: none;
    padding-left: 0;
}

.manual-section li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-primary);
}

.manual-section li::before {
    content: '•';
    display: inline-block;
    color: var(--accent-secondary);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.5rem;
    line-height: 1;
}

/* 联系方式 */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.contact-info {
    background: linear-gradient(90deg, #ff0000 0%, #ff0000 30%, #ff7f00 35%, #ffff00 40%, #00ff00 45%, #0000ff 50%, #4b0082 55%, #9400d3 60%, #9400d3 100%);
    background-size: 400% 400%;
    animation: rainbow 25s ease-in-out infinite;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.contact-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-label {
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.contact-value {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 页脚 */
.footer {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.footer p {
    margin: 0;
}

.icp-record {
    color: var(--text-secondary);
    font-size: 0.76rem;
    text-decoration: none;
    transition: color 0.25s ease, opacity 0.25s ease;
}

.icp-record:hover,
.icp-record:focus-visible {
    color: var(--accent-secondary);
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* 彩虹渐变效果 */
.rainbow-text {
    background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow 3s ease-in-out infinite;
    background-size: 400% 100%;
}

@keyframes rainbow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 呼吸效果 */
.breathing {
    animation: breathing 3s ease-in-out infinite;
}

@keyframes breathing {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

/* 渐变呼吸效果 */
.gradient-breathing {
    display: inline-block;
    background: linear-gradient(135deg, #f472b6, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-breathing 3s ease-in-out infinite;
    background-size: 200% 200%;
}

/* 浅色主题下的渐变 */
[data-theme="light"] .gradient-breathing {
    background: linear-gradient(135deg, #c026d3, #7e22ce);
}

@keyframes gradient-breathing {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timeline::before {
        left: 2px;
    }
    
    .timeline-item {
        flex-direction: column;
    }
    
    .timeline-date,
    .timeline-content {
        width: 100%;
    }
    
    .timeline-date {
        text-align: left;
        padding-right: 0;
        padding-left: 0;
        margin-bottom: 1rem;
    }
    
    .timeline-item:nth-child(odd) .timeline-date {
        padding-left: 0;
    }
    
    .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content {
        border-left: 3px solid var(--accent-primary);
        border-right: none;
        padding-left: 1.25rem;
    }
    
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
    }
}

/* 技术感交互层 */
.skip-link {
    position: fixed;
    left: 1rem;
    top: -4rem;
    z-index: 1200;
    padding: 0.7rem 1rem;
    border-radius: 0 0 8px 8px;
    background: var(--accent-primary);
    color: #fff;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

.scroll-progress {
    position: fixed;
    inset: 0 0 auto;
    height: 3px;
    z-index: 1100;
    background: transparent;
    pointer-events: none;
}

.scroll-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #f472b6, #d946ef, #60a5fa);
    box-shadow: 0 0 12px rgba(217, 70, 239, 0.7);
    transition: width 0.08s linear;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.35;
    background-image: linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 58%);
}

[data-theme="light"] body::before {
    opacity: 0.2;
}

.navbar {
    backdrop-filter: blur(16px);
    background-color: color-mix(in srgb, var(--bg-secondary) 86%, transparent);
}

.nav-brand {
    position: relative;
}

.brand-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.25rem;
    color: #4ade80;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
}

.brand-status i,
.console-live i,
.console-status i,
.hero-proof i {
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 12%, transparent);
}

.navbar.is-scrolled {
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.22);
}

.nav-menu a.is-active {
    color: var(--accent-secondary);
}

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

.mobile-menu-toggle {
    display: none;
    width: 42px;
    height: 38px;
    padding: 0.55rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    height: 2px;
    margin: 4px 0;
    background: var(--text-primary);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-6px) rotate(-45deg);
}

.hero {
    min-height: 720px;
    padding: 11rem 0 7rem;
    text-align: left;
}

.hero::after {
    content: '01 / PROFILE';
    position: absolute;
    right: 2rem;
    bottom: 2rem;
    color: rgba(148, 163, 184, 0.35);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: clamp(3rem, 7vw, 7rem);
    align-items: center;
}

.hero-content {
    text-align: left;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    letter-spacing: 0.11em;
}

.hero-eyebrow::before {
    content: '//';
    color: #60a5fa;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
}

.hero h2 {
    max-width: 760px;
    margin-bottom: 1.5rem;
    font-size: clamp(3rem, 6vw, 5.8rem);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.hero h2 em {
    font-style: normal;
    color: transparent;
    background: linear-gradient(110deg, #f9a8d4 0%, #d946ef 45%, #60a5fa 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-description {
    max-width: 580px;
    margin-bottom: 2rem !important;
    font-size: 1.1rem !important;
    line-height: 1.9;
}

.hero-actions {
    justify-content: flex-start;
}

.hero-actions a span {
    margin-left: 0.4rem;
    transition: transform 0.25s ease;
}

.hero-actions a:hover span {
    display: inline-block;
    transform: translate(3px, -3px);
}

.hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 1.3rem;
    margin-top: 2.2rem;
    color: var(--text-secondary);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.78rem;
}

.hero-proof span {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.hero-proof i {
    width: 0.35rem;
    height: 0.35rem;
    color: #4ade80;
}

.hero-console {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94));
    box-shadow: 0 24px 80px rgba(2, 6, 23, 0.42), inset 0 1px rgba(255, 255, 255, 0.08);
    font-family: 'Courier New', Courier, monospace;
    transform: perspective(1000px) rotateY(-3deg);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.hero-console::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg, rgba(244, 114, 182, 0.08), transparent 35%, rgba(96, 165, 250, 0.08));
}

.hero-console:hover {
    transform: perspective(1000px) rotateY(0deg) translateY(-6px);
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.52), inset 0 1px rgba(255, 255, 255, 0.1);
}

.console-header,
.console-footer {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 1.1rem;
    color: #94a3b8;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    font-size: 0.72rem;
}

.console-dots {
    display: flex;
    gap: 0.3rem;
    margin-right: 0.4rem;
}

.console-dots i {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #f87171;
}

.console-dots i:nth-child(2) { background: #facc15; }
.console-dots i:nth-child(3) { background: #4ade80; }

.console-live {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: auto;
    color: #4ade80;
    font-size: 0.62rem;
}

.console-body {
    position: relative;
    padding: 1.5rem 1.35rem;
    color: #cbd5e1;
    font-size: clamp(0.72rem, 1.4vw, 0.86rem);
    line-height: 1.95;
}

.console-body p { margin: 0; }
.console-comment { color: #64748b; }
.console-keyword { color: #c084fc; }
.console-key { color: #60a5fa; }
.console-string { color: #86efac; }
.console-number { color: #f9a8d4; }
.console-indent { padding-left: 1.5rem; }
.console-indent-double { padding-left: 3rem; }

.console-cursor {
    display: inline-block;
    width: 0.5rem;
    height: 1rem;
    margin-left: 0.25rem;
    vertical-align: -0.15rem;
    background: #f472b6;
    animation: console-blink 1s step-end infinite;
}

@keyframes console-blink { 50% { opacity: 0; } }

.console-footer {
    justify-content: space-between;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    border-bottom: 0;
}

.console-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #4ade80;
    font-size: 0.62rem;
}

.section-intro {
    max-width: 660px;
    margin: -1.5rem auto 3rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.8;
}

.section.reveal-ready {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease var(--reveal-delay, 0ms), transform 0.7s ease var(--reveal-delay, 0ms);
}

.section.reveal-ready.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.section:target {
    scroll-margin-top: 96px;
}

.section.is-visible .section-title::after {
    animation: title-line-in 0.8s ease both;
}

@keyframes title-line-in {
    from { width: 0; opacity: 0; }
    to { width: 80px; opacity: 1; }
}

.timeline-content {
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-primary);
    background: linear-gradient(135deg, var(--card-bg), rgba(15, 23, 42, 0.45));
}

.timeline-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.25rem 0 0.85rem;
    padding: 0;
    border: 0;
    color: var(--accent-secondary);
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
}

.timeline-toggle::after {
    content: '↗';
    transition: transform 0.25s ease;
}

.timeline-content.is-collapsed .timeline-toggle::after {
    transform: rotate(90deg);
}

.timeline-content.is-collapsed ul {
    display: none;
}

.timeline-content ul {
    animation: details-in 0.25s ease both;
}

@keyframes details-in {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.project-card,
.skill-category,
.stats-card {
    will-change: transform;
}

.project-card:focus-within,
.skill-category:focus-within {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 3px;
}

.contact-value {
    text-decoration: none;
}

.contact-value:hover {
    color: #fef08a;
}

.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: -1rem auto 2.5rem;
}

.project-filter {
    padding: 0.55rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-secondary);
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 0.85rem;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.project-filter:hover {
    color: var(--text-primary);
    border-color: var(--accent-secondary);
    transform: translateY(-1px);
}

.project-filter.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-color: transparent;
}

.project-card.is-hidden {
    display: none;
}

.contact-action {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    min-width: 0;
}

.copy-contact {
    padding: 0.25rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    font: inherit;
    font-size: 0.72rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.copy-contact:hover,
.copy-contact:focus-visible {
    background: rgba(255, 255, 255, 0.25);
    border-color: #fff;
    transform: translateY(-1px);
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    z-index: 1200;
    max-width: calc(100vw - 2rem);
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.28);
    font-size: 0.82rem;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 1rem);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* 白色主题专属色彩：清晰、克制，同时保留技术感 */
[data-theme="light"] .theme-toggle {
    color: #5b21b6;
    background: rgba(255, 255, 255, 0.96);
    border-color: #c4b5fd;
    box-shadow: 0 0 0 1px rgba(109, 40, 217, 0.08), 0 8px 22px rgba(71, 85, 105, 0.14);
}

[data-theme="light"] .theme-toggle:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #6d28d9, #db2777);
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.12), 0 12px 26px rgba(109, 40, 217, 0.25);
}

[data-theme="light"] .language-switch {
    color: #5b21b6 !important;
    background: rgba(255, 255, 255, 0.9);
    border-color: #c4b5fd;
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.08);
}

[data-theme="light"] .language-switch:hover,
[data-theme="light"] .language-switch:focus-visible {
    color: #ffffff !important;
    background: linear-gradient(135deg, #6d28d9, #db2777);
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(109, 40, 217, 0.24);
}

[data-theme="light"] .hero::before {
    background: radial-gradient(circle at 58% 42%, rgba(109, 40, 217, 0.1), transparent 68%);
}

[data-theme="light"] .hero h2 {
    background: linear-gradient(110deg, #5b21b6 0%, #9333ea 48%, #be185d 100%);
    background-size: 220% 220%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: light-title-gradient-breathe 8s ease-in-out infinite;
    will-change: background-position, opacity;
}

[data-theme="light"] .hero h2 em {
    background-size: 220% 220%;
    animation: light-title-gradient-breathe 8s ease-in-out infinite reverse;
    will-change: background-position, opacity;
}

@keyframes light-title-gradient-breathe {
    0%, 100% {
        background-position: 0% 50%;
        opacity: 0.92;
    }
    50% {
        background-position: 100% 50%;
        opacity: 1;
    }
}

[data-theme="light"] .hero-eyebrow,
[data-theme="light"] .project-kicker,
[data-theme="light"] .timeline-toggle {
    color: #7c3aed;
}

[data-theme="light"] .btn-primary {
    background: linear-gradient(135deg, #6d28d9, #db2777);
    box-shadow: 0 10px 22px rgba(109, 40, 217, 0.18);
}

[data-theme="light"] .btn-secondary {
    color: #334155;
    background: rgba(255, 255, 255, 0.78);
    border-color: #cbd5e1;
}

[data-theme="light"] .btn-secondary:hover {
    color: #6d28d9;
    background: #ffffff;
    border-color: #a78bfa;
}

[data-theme="light"] .hero-console {
    border-color: #cbd5e1;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.96));
    box-shadow: 0 24px 70px rgba(51, 65, 85, 0.16), inset 0 1px #ffffff;
}

[data-theme="light"] .hero-console::before {
    background: linear-gradient(115deg, rgba(124, 58, 237, 0.06), transparent 35%, rgba(37, 99, 235, 0.07));
}

[data-theme="light"] .console-header,
[data-theme="light"] .console-footer {
    color: #64748b;
    border-color: #dbe4ef;
}

[data-theme="light"] .console-body {
    color: #334155;
}

[data-theme="light"] .console-comment { color: #94a3b8; }
[data-theme="light"] .console-keyword { color: #7c3aed; }
[data-theme="light"] .console-key { color: #2563eb; }
[data-theme="light"] .console-string { color: #15803d; }
[data-theme="light"] .console-number { color: #be185d; }

[data-theme="light"] .skill-category,
[data-theme="light"] .project-card,
[data-theme="light"] .manual-section,
[data-theme="light"] .timeline-content,
[data-theme="light"] .stats-card {
    box-shadow: 0 12px 30px rgba(51, 65, 85, 0.08);
}

[data-theme="light"] .timeline-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.9));
}

[data-theme="light"] .contact-info {
    border: 2px solid transparent;
    background: linear-gradient(120deg, #5b21b6 0%, #be185d 42%, #1d4ed8 72%, #6d28d9 100%) padding-box, conic-gradient(from var(--contact-angle, 0deg), #ef4444, #f59e0b, #facc15, #22c55e, #06b6d4, #3b82f6, #8b5cf6, #ec4899, #ef4444) border-box;
    background-size: 280% 280%, 100% 100%;
    animation: light-contact-breathe 9s ease-in-out infinite, light-contact-rainbow-border 5s linear infinite;
}

@keyframes light-contact-breathe {
    0%, 100% {
        background-position: 0% 50%, 0 0;
        box-shadow: 0 8px 22px rgba(109, 40, 217, 0.16);
    }
    50% {
        background-position: 100% 50%, 0 0;
        box-shadow: 0 14px 34px rgba(190, 24, 93, 0.22);
    }
}

@keyframes light-contact-rainbow-border {
    from { --contact-angle: 0deg; }
    to { --contact-angle: 360deg; }
}

[data-theme="light"] .section-title::after {
    background: linear-gradient(90deg, #6d28d9, #db2777);
}

[data-theme="light"] .scroll-progress span {
    background: linear-gradient(90deg, #6d28d9, #db2777, #2563eb);
}

[data-theme="light"] .project-tags span {
    color: var(--accent-primary);
    background: #ffffff;
    border: 1px solid var(--accent-primary);
    box-shadow: 0 2px 8px rgba(109, 40, 217, 0.08);
}

[data-theme="light"] .project-tags span:hover {
    color: var(--accent-secondary);
    border-color: var(--accent-secondary);
    background: #ffffff;
}

[data-theme="light"] .project-filter {
    color: #64748b;
    background: rgba(255, 255, 255, 0.72);
    border-color: #cbd5e1;
}

[data-theme="light"] .project-filter:hover {
    color: #4c1d95;
    border-color: #a78bfa;
    background: #ffffff;
}

[data-theme="light"] .project-filter.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, #6d28d9, #db2777);
    border-color: transparent;
}

[data-theme="light"] .toast {
    color: #ffffff;
    background: rgba(23, 35, 58, 0.94);
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero {
        min-height: auto;
        padding-top: 10rem;
    }

    .hero-console {
        max-width: 680px;
        width: 100%;
        margin: 0 auto;
        transform: none;
    }

    .hero-console:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 768px) {
    .theme-toggle {
        top: 12px;
        right: 72px;
        width: 40px;
        height: 40px;
    }

    .navbar .container {
        position: relative;
        padding-right: 20px;
    }

    .nav-brand {
        max-width: calc(100% - 112px);
    }

    .mobile-menu-toggle {
        display: block;
        flex: 0 0 auto;
    }

    .navbar .nav-menu {
        position: absolute;
        top: calc(100% + 0.75rem);
        right: 0;
        display: none;
        flex-direction: column;
        gap: 0;
        min-width: 190px;
        padding: 0.5rem;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        background: color-mix(in srgb, var(--bg-secondary) 96%, transparent);
        box-shadow: 0 18px 40px rgba(2, 6, 23, 0.25);
    }

    .navbar .nav-menu.is-open {
        display: flex;
    }

    .navbar .nav-menu a {
        display: block;
        padding: 0.75rem 0.8rem;
        border-radius: 6px;
    }

    .navbar .nav-menu .nav-language {
        margin-top: 0.35rem;
        padding-top: 0.35rem;
        border-top: 1px solid var(--border-color);
    }

    .navbar .nav-menu .language-switch {
        display: inline-flex;
        width: 100%;
        padding: 0.65rem 0.8rem;
        justify-content: center;
    }

    .navbar .nav-menu a:hover,
    .navbar .nav-menu a.is-active {
        background: rgba(217, 70, 239, 0.1);
    }

    .nav-brand p {
        max-width: 220px;
        line-height: 1.25;
    }

    .brand-status {
        display: none;
    }

    .hero {
        padding-top: 9rem;
        padding-bottom: 5rem;
    }

    .hero::after {
        display: none;
    }

    .hero h2 {
        font-size: clamp(2.8rem, 12vw, 4.5rem);
    }

    .hero-description {
        font-size: 1rem !important;
    }

    .hero-proof {
        gap: 0.8rem 1rem;
    }

    .console-body {
        padding: 1.15rem 0.95rem;
        font-size: 0.68rem;
    }

    .console-indent { padding-left: 0.8rem; }
    .console-indent-double { padding-left: 1.6rem; }

    .section-intro {
        margin-bottom: 2rem;
    }

    .section {
        padding: 4.5rem 0;
    }

    .hero-actions a {
        width: 100%;
        text-align: center;
    }

    .about-info {
        min-width: 0;
    }

    .info-item {
        align-items: flex-start;
        gap: 0.75rem;
    }

    .info-label {
        flex: 0 0 auto;
    }

    .info-value {
        min-width: 0;
        overflow-wrap: anywhere;
        text-align: right;
    }

    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .contact-value {
        max-width: 100%;
        overflow-wrap: anywhere;
        text-align: left;
    }

    .contact-action {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 420px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .navbar .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .nav-brand h1 {
        font-size: 1.5rem;
    }

    .nav-brand p {
        font-size: 0.72rem;
    }

    .theme-toggle {
        right: 66px;
    }

    .stats-grid {
        gap: 0.65rem;
    }

    .stats-card {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .stats-card strong {
        font-size: 1.35rem;
    }

    .stats-card span {
        font-size: 0.72rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .hero-console {
        transform: none;
    }
}

/* English layout refinement: keep the Chinese visual language, but give longer
   English labels more breathing room and a calmer type scale. */
html[lang="en"] body {
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: -0.01em;
}

html[lang="en"] .navbar .container {
    gap: 1.5rem;
}

html[lang="en"] .nav-brand {
    min-width: 0;
    flex: 0 1 320px;
}

html[lang="en"] .nav-brand h1 {
    font-size: 1.55rem;
    letter-spacing: -0.04em;
}

html[lang="en"] .nav-brand p {
    max-width: 19rem;
    font-size: 0.72rem;
    line-height: 1.3;
    letter-spacing: 0.01em;
}

html[lang="en"] .nav-menu {
    gap: clamp(0.65rem, 1.35vw, 1.35rem);
    justify-content: flex-end;
}

html[lang="en"] .nav-menu a:not(.language-switch) {
    font-size: 0.82rem;
    white-space: nowrap;
}

html[lang="en"] .hero-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
    gap: clamp(2.5rem, 5vw, 5.25rem);
}

html[lang="en"] .hero-eyebrow {
    font-size: 0.8rem !important;
    letter-spacing: 0.08em;
    line-height: 1.5;
}

html[lang="en"] .hero h2 {
    max-width: 620px;
    font-size: clamp(2.8rem, 4.7vw, 4.75rem);
    line-height: 1.04;
    letter-spacing: -0.075em;
}

html[lang="en"] .hero-description {
    max-width: 550px;
    font-size: 1rem !important;
    line-height: 1.75;
}

html[lang="en"] .hero-actions {
    gap: 0.75rem;
}

html[lang="en"] .hero-actions .btn-primary,
html[lang="en"] .hero-actions .btn-secondary {
    padding: 0.7rem 1.35rem;
    font-size: 0.88rem;
}

html[lang="en"] .hero-proof {
    gap: 0.85rem 1.15rem;
    font-size: 0.7rem;
}

html[lang="en"] .hero-console {
    min-width: 0;
}

html[lang="en"] .hero-content,
html[lang="en"] .about-text,
html[lang="en"] .about-info,
html[lang="en"] .skill-category,
html[lang="en"] .timeline-content,
html[lang="en"] .project-card,
html[lang="en"] .manual-section,
html[lang="en"] .contact-info {
    min-width: 0;
}

html[lang="en"] .console-header,
html[lang="en"] .console-footer {
    padding: 0.75rem 0.95rem;
    font-size: 0.67rem;
}

html[lang="en"] .console-body {
    padding: 1.25rem 1.1rem;
    font-size: clamp(0.62rem, 1.05vw, 0.78rem);
    line-height: 1.9;
}

html[lang="en"] .console-indent {
    padding-left: 1.2rem;
}

html[lang="en"] .console-indent-double {
    padding-left: 2.4rem;
}

html[lang="en"] .section-title {
    font-size: 1.9rem;
}

html[lang="en"] .section-intro {
    max-width: 720px;
    font-size: 0.94rem;
    line-height: 1.75;
}

html[lang="en"] .about-content {
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: clamp(2rem, 5vw, 4rem);
}

html[lang="en"] .about-text p {
    font-size: 0.98rem;
    line-height: 1.8;
}

html[lang="en"] .about-text .lead {
    font-size: 1.18rem;
    line-height: 1.5;
}

html[lang="en"] .tag-row {
    gap: 0.5rem;
}

html[lang="en"] .tag-row span {
    padding: 0.3rem 0.65rem;
    font-size: 0.74rem;
}

html[lang="en"] .info-item {
    align-items: flex-start;
    gap: 1rem;
}

html[lang="en"] .info-label {
    flex: 0 0 6.8rem;
    font-size: 0.78rem;
}

html[lang="en"] .info-value {
    min-width: 0;
    font-size: 0.82rem;
    line-height: 1.55;
    text-align: right;
    overflow-wrap: anywhere;
}

html[lang="en"] .stats-grid {
    gap: 0.85rem;
    margin-top: 3rem;
}

html[lang="en"] .stats-card {
    min-width: 0;
    padding: 1.2rem 0.75rem;
}

html[lang="en"] .stats-card strong {
    font-size: 1.45rem;
    line-height: 1.2;
}

html[lang="en"] .stats-card span {
    font-size: 0.76rem;
    line-height: 1.45;
}

html[lang="en"] .skills-grid {
    gap: 1.25rem;
}

html[lang="en"] .skill-category {
    padding: 1.55rem 1.4rem;
}

html[lang="en"] .skill-category h3 {
    font-size: 1.12rem;
}

html[lang="en"] .skill-list li {
    padding: 0.42rem 0 0.42rem 1.35rem;
    font-size: 0.86rem;
    line-height: 1.55;
}

html[lang="en"] .timeline {
    max-width: 1060px;
    padding-left: 42px;
}

html[lang="en"] .timeline-item {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

html[lang="en"] .timeline-date {
    font-size: 0.84rem;
    letter-spacing: 0.01em;
}

html[lang="en"] .timeline-content {
    padding: 1.25rem;
}

html[lang="en"] .timeline-content h3 {
    font-size: 1.15rem;
}

html[lang="en"] .timeline-content .company {
    font-size: 0.84rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

html[lang="en"] .timeline-content li {
    padding: 0.25rem 0 0.25rem 1.35rem;
    font-size: 0.87rem;
    line-height: 1.65;
}

html[lang="en"] .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.25rem;
}

html[lang="en"] .project-card {
    padding: 1.5rem;
}

html[lang="en"] .project-kicker {
    font-size: 0.7rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

html[lang="en"] .project-card h3 {
    font-size: 1.15rem;
}

html[lang="en"] .project-card p {
    font-size: 0.88rem;
    line-height: 1.7;
}

html[lang="en"] .project-outcome {
    font-size: 0.8rem;
    line-height: 1.55;
}

html[lang="en"] .project-tags span {
    padding: 0.28rem 0.65rem;
    font-size: 0.72rem;
}

html[lang="en"] .manual-content {
    max-width: 860px;
}

html[lang="en"] .manual-section {
    padding: 1.55rem;
}

html[lang="en"] .manual-section h3 {
    font-size: 1.12rem;
}

html[lang="en"] .manual-section p,
html[lang="en"] .manual-section li {
    font-size: 0.88rem;
    line-height: 1.7;
}

html[lang="en"] .contact-content {
    max-width: 700px;
}

html[lang="en"] .contact-content p {
    font-size: 1rem;
    line-height: 1.7;
}

html[lang="en"] .contact-info {
    padding: 1.5rem;
}

html[lang="en"] .contact-item,
html[lang="en"] .contact-value,
html[lang="en"] .copy-contact {
    font-size: 0.88rem;
}

@media (max-width: 1100px) and (min-width: 769px) {
    html[lang="en"] .navbar .container {
        gap: 1rem;
    }

    html[lang="en"] .nav-brand {
        flex-basis: 250px;
    }

    html[lang="en"] .nav-menu {
        gap: 0.55rem;
    }

    html[lang="en"] .nav-menu a:not(.language-switch) {
        font-size: 0.76rem;
    }
}

@media (max-width: 900px) {
    html[lang="en"] .hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    html[lang="en"] .hero-console {
        max-width: 680px;
        width: 100%;
        margin: 0 auto;
        transform: none;
    }

    html[lang="en"] .hero h2 {
        max-width: 700px;
        font-size: clamp(2.8rem, 8vw, 4.4rem);
    }

    html[lang="en"] .about-content {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    html[lang="en"] .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    html[lang="en"] .navbar .container {
        gap: 0.75rem;
        padding-left: 16px;
        padding-right: 16px;
    }

    html[lang="en"] .nav-brand {
        max-width: calc(100% - 112px);
        flex: 1 1 auto;
    }

    html[lang="en"] .nav-brand h1 {
        font-size: 1.45rem;
    }

    html[lang="en"] .nav-brand p {
        max-width: 220px;
        font-size: 0.66rem;
    }

    html[lang="en"] .navbar .nav-menu {
        min-width: 230px;
    }

    html[lang="en"] .hero h2 {
        font-size: clamp(2.35rem, 10vw, 3.8rem);
        line-height: 1.04;
        max-width: 100%;
    }

    html[lang="en"] .hero-eyebrow {
        max-width: 20rem;
        font-size: 0.72rem !important;
    }

    html[lang="en"] .hero-description {
        font-size: 0.92rem !important;
    }

    html[lang="en"] .section-title {
        font-size: 1.75rem;
    }

    html[lang="en"] .section-intro {
        font-size: 0.88rem;
    }

    html[lang="en"] .about-text p {
        font-size: 0.9rem;
    }

    html[lang="en"] .about-text .lead {
        font-size: 1.08rem;
    }

    html[lang="en"] .about-content,
    html[lang="en"] .skills-grid,
    html[lang="en"] .projects-grid {
        grid-template-columns: 1fr;
    }

    html[lang="en"] .about-info .info-item {
        display: grid;
        grid-template-columns: minmax(6.2rem, auto) minmax(0, 1fr);
        gap: 0.65rem;
    }

    html[lang="en"] .info-value {
        text-align: left;
    }

    html[lang="en"] .stats-card strong {
        font-size: 1.2rem;
    }

    html[lang="en"] .stats-card span {
        font-size: 0.7rem;
    }

    html[lang="en"] .skill-category {
        padding: 1.35rem 1.2rem;
    }

    html[lang="en"] .skill-list li,
    html[lang="en"] .timeline-content li {
        font-size: 0.82rem;
    }

    html[lang="en"] .timeline {
        padding-left: 32px;
    }

    html[lang="en"] .timeline-item {
        padding-left: 1rem;
    }

    html[lang="en"] .timeline-content {
        padding: 1rem;
    }

    html[lang="en"] .manual-section {
        padding: 1.25rem;
    }

    html[lang="en"] .contact-info {
        padding: 1.1rem;
    }

    html[lang="en"] .project-filters {
        gap: 0.45rem;
        margin-top: -0.5rem;
        margin-bottom: 2rem;
    }

    html[lang="en"] .project-filter {
        padding: 0.48rem 0.75rem;
        font-size: 0.76rem;
    }
}

@media (max-width: 420px) {
    html[lang="en"] .hero h2 {
        font-size: clamp(2.05rem, 10.5vw, 3.2rem);
    }

    html[lang="en"] .hero-proof {
        font-size: 0.65rem;
    }

    html[lang="en"] .stats-card {
        padding-left: 0.45rem;
        padding-right: 0.45rem;
    }

    html[lang="en"] .stats-card strong {
        font-size: 1.08rem;
    }
}
