/* ==========================================
   components.css
   可复用组件样式
   当前内容：
   - Navbar 右侧布局
   - Language Switcher 语言切换器
========================================== */


/* ==========================================
    Navbar Right Area
   作用：让导航链接和语言切换器横向排列
========================================== */
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}


/* ==========================================
   Language Switcher 容器
   作用：作为下拉菜单的定位参考点
========================================== */
.language-switcher {
    position: relative;
}


/* ==========================================
   🌐 按钮本体：显示为一个简洁的语言切换按钮
========================================== */
.language-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

/* 鼠标悬停效果 */
.language-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
}


/* ==========================================
   下拉菜单本体：默认隐藏，点击后通过 .show 显示
========================================== */
.language-dropdown {
    display: none; /* 默认不显示 */
    position: absolute;
    top: 120%;     /* 出现在按钮下方 */
    right: 0;
    min-width: 170px;

    background-color: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);

    overflow: hidden;
    z-index: 1000;
}

/* 当 JS 给它加上 .show 时显示出来 */
.language-dropdown.show {
    display: block;
}


/* ==========================================
   下拉菜单里的每个语言选项
========================================== */
.language-option {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: none;
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* 鼠标悬停时高亮 */
.language-option:hover {
    background-color: #f5f5f5;
}


/* ==========================================
   Quick Links Dropdown
========================================== */
.quick-links {
    position: relative;
}

.quick-links::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 180px;
    height: 14px;
}

.quick-links-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.quick-links-btn:hover,
.quick-links-btn.is-open {
    color: #ffffff;
}

.quick-links-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 180px;
    background-color: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.38);
    overflow: hidden;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.quick-links-dropdown.show {
    display: block;
}

.quick-link-item {
    display: block;
    padding: 12px 16px;
    color: #e2e8f0;
    font-size: 0.95rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.quick-link-item:hover {
    background-color: rgba(51, 65, 85, 0.82);
    color: #ffffff;
}


/* ==========================================
   Project Card
========================================== */
.project-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* 鼠标悬停时微微浮起 */
.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.project-card__title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: #333333;
}

.project-card__description {
    margin-bottom: 16px;
    line-height: 1.7;
    color: #4b5563;
}

.project-card__stack {
    font-size: 0.95rem;
    color: #374151;
}


/* ==========================================
   About Page - Hero Layout
========================================== */

.about-page {
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.08), transparent 38%),
        radial-gradient(circle at bottom right, rgba(125, 211, 252, 0.05), transparent 34%),
        linear-gradient(180deg, #0b1223 0%, #0f172a 42%, #111827 100%);
}

.about-page::before,
.about-page::after {
    content: "";
    position: fixed;
    inset: auto;
    width: 34rem;
    height: 34rem;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(90px);
    opacity: 0.34;
    z-index: -1;
}

.about-page::before {
    top: 10%;
    left: -10%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.16) 0%, rgba(56, 189, 248, 0.04) 42%, transparent 72%);
    animation: aboutGlowFloatOne 18s ease-in-out infinite alternate;
}

.about-page::after {
    right: -8%;
    bottom: 8%;
    background: radial-gradient(circle, rgba(148, 163, 184, 0.14) 0%, rgba(59, 130, 246, 0.05) 46%, transparent 74%);
    animation: aboutGlowFloatTwo 22s ease-in-out infinite alternate;
}

.about-page main {
    position: relative;
    z-index: 1;
}

.about-page .section {
    padding: 56px 0;
}

.about-page-title {
    padding-top: 72px;
    padding-bottom: 10px;
}

.about-hero-section {
    padding-top: 0;
    padding-bottom: 48px;
}

/* 左右布局 */
.about-hero {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 48px;
}

/* 图片容器 */
.about-photo-wrapper {
    flex-shrink: 0;
}

/* 头像 */
.about-photo {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;

    border: 2px solid rgba(255,255,255,0.1);
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

/* 右侧文字 */
.about-text {
    flex: 1;
    max-width: 600px;
}

.about-hero-intro {
    margin-bottom: 12px;
}

.about-name-native,
.about-name-english,
.about-hero-summary {
    display: block;
}

.about-name-native {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7dd3fc;
    margin-bottom: 10px;
}

.about-name-english {
    font-size: clamp(2.3rem, 5vw, 4.3rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #f8fafc;
    text-shadow: 0 0 28px rgba(56, 189, 248, 0.12);
    margin-bottom: 14px;
}

.about-hero-summary {
    font-size: 1.08rem;
    line-height: 1.8;
    color: #dbe8f5;
    max-width: 34rem;
}

.about-hero-description {
    margin-bottom: 0;
    max-width: 100%;
}

.hero-description.secondary {
    margin-top: 12px;
    margin-bottom: 0;
    opacity: 0.78;
    font-size: 1rem;
    max-width: 34rem;
}


/* ==========================================
   Download Portal
========================================== */
.download-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.download-shell {
    width: 100%;
    max-width: 560px;
}

.download-card {
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    padding: 36px;
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.36);
    backdrop-filter: blur(14px);
}

.download-title {
    font-size: 2.1rem;
    color: #ffffff;
    margin-bottom: 14px;
}

.download-text {
    color: #cbd5e1;
    line-height: 1.8;
    margin-bottom: 28px;
}

.download-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.download-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.download-label {
    color: #e2e8f0;
    font-size: 0.95rem;
    font-weight: 600;
}

.download-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.72);
    color: #f8fafc;
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.download-input::placeholder {
    color: #64748b;
}

.download-input:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.download-submit {
    align-self: flex-start;
    border: none;
}

.download-result {
    margin-top: 24px;
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
    line-height: 1.7;
}

.download-result.is-error {
    border-color: rgba(248, 113, 113, 0.34);
    color: #fecaca;
}

.download-result.is-success {
    border-color: rgba(56, 189, 248, 0.34);
    color: #dbeafe;
}

.download-result[hidden] {
    display: none;
}

.download-link-output {
    display: inline-block;
    margin-top: 8px;
    color: #7dd3fc;
    word-break: break-all;
}

@keyframes aboutGlowFloatOne {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    100% {
        transform: translate3d(10%, 6%, 0) scale(1.08);
    }
}

@keyframes aboutGlowFloatTwo {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    100% {
        transform: translate3d(-8%, -10%, 0) scale(1.12);
    }
}
