/* ================================================================
   组件样式：图片占位 / 经历 / 爱好 / AI助手 / 联系 / 页脚 / 动画 / 响应式
   依赖 style.css 中定义的 CSS 变量，请确保 style.css 先加载
   ================================================================ */

/* ── 图片占位符 ─────────────────────────────────────────────── */
.img-placeholder {
    background: rgba(255, 255, 255, 0.025);
    border: 1.5px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.4rem 1rem;
    text-align: center;
    color: var(--text-dim);
    min-height: 110px;
    gap: 0.3rem;
    transition: border-color 0.25s;
}
.img-placeholder:hover { border-color: var(--accent-border); }
.img-placeholder span  { font-size: 1.4rem; }
.img-placeholder p     { font-size: 0.78rem; line-height: 1.4; }
.img-placeholder small {
    font-size: 0.68rem;
    font-family: 'Courier New', monospace;
    color: var(--text-dim);
}
.img-placeholder.small { min-height: 85px; padding: 0.9rem; }

/* ================================================================
   我走过的路
   ================================================================ */
.journey-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    max-width: 800px;
}
.journey-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.3s;
}
.journey-card.featured { border-color: rgba(0, 212, 255, 0.18); }

.journey-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}
.journey-header:hover { background: rgba(255, 255, 255, 0.02); }

.journey-title-group { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.journey-card h3     { font-size: 1rem; font-weight: 600; }
.journey-tag {
    font-size: 0.68rem;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    color: var(--accent);
    padding: 0.12rem 0.5rem;
    border-radius: 4px;
}

/* + 按钮：open 时旋转变 × */
.journey-toggle {
    font-size: 1.3rem;
    color: var(--text-dim);
    line-height: 1;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.35s var(--ease), color 0.2s;
}
.journey-card.open .journey-toggle { transform: rotate(45deg); color: var(--accent); }

/* 摘要：始终可见 */
.journey-preview {
    padding: 1rem 1.5rem 1.2rem;
    font-size: 0.93rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* 完整内容：max-height 动画实现展开/收起 */
.journey-full {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--ease);
}
.journey-card.open .journey-full { max-height: 700px; }

.journey-full-inner {
    padding: 1.1rem 1.5rem 1.4rem;
    border-top: 1px dashed var(--border);
}
.journey-full-inner p { color: var(--text-muted); font-size: 0.93rem; margin-bottom: 0.75rem; }

.journey-photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* ================================================================
   兴趣爱好
   ================================================================ */
.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.hobby-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
    transition: border-color 0.3s, transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.hobby-card:hover {
    border-color: var(--accent-border);
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 212, 255, 0.13), 0 2px 14px rgba(0, 0, 0, 0.4);
}
.hobby-icon   { font-size: 1.8rem; margin-bottom: 0.75rem; }
.hobby-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.hobby-card p  { color: var(--text-muted); font-size: 0.93rem; }
.hobby-card strong { color: var(--text); }

/* ================================================================
   AI 助手占位区
   ================================================================ */
.ai-box {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px dashed var(--accent-border);
    border-radius: var(--radius);
    max-width: 480px;
    margin: 0 auto;
}
.ai-icon {
    font-size: 2.4rem;
    color: var(--accent);
    margin-bottom: 1rem;
    display: block;
    animation: pulse 2.5s ease-in-out infinite;
}
.ai-box h2 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.ai-sub    { color: var(--accent); font-size: 0.85rem; letter-spacing: 0.1em; margin-bottom: 0.75rem; }
.ai-desc   { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 1.75rem; }
.ai-btn {
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    color: var(--text-muted);
    padding: 0.7rem 1.8rem;
    border-radius: 8px;
    font-size: 0.88rem;
    opacity: 0.55;
}

/* ================================================================
   联系方式
   ================================================================ */
.contact-wrap  { max-width: 560px; }
.contact-lead  { color: var(--text-muted); margin-bottom: 2rem; font-size: 1rem; }
.contact-items { display: flex; flex-direction: column; gap: 0.85rem; }
.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    font-size: 0.93rem;
    color: var(--text-muted);
    transition: border-color 0.2s;
}
.contact-item:hover { border-color: var(--accent-border); }
.ci-icon { font-size: 1.2rem; }

/* ================================================================
   页脚
   ================================================================ */
footer {
    text-align: center;
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.82rem;
}

/* ================================================================
   滚动淡入动画（由 JS IntersectionObserver 控制）
   JS 给目标元素加 .fade-item，进入视口后再加 .visible
   ================================================================ */
.fade-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.fade-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================================
   关键帧动画
   ================================================================ */
@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}
/* bounce：让箭头轻微浮动，节奏稍快一点更自然 */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(6px); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

/* ================================================================
   响应式适配（平板 & 手机）
   ================================================================ */
@media (max-width: 768px) {
    .works-grid     { grid-template-columns: 1fr; }
    .work-images    { grid-template-columns: 1fr; }
    .journey-photos { grid-template-columns: 1fr; }
    .hobbies-grid   { grid-template-columns: 1fr; }
    .section        { padding: 2.75rem 1.25rem; }
    .nav-links      { gap: 1rem; }
    .nav-links a    { font-size: 0.8rem; }
}

@media (max-width: 480px) {
    .nav-links           { display: none; }
    .hero-title          { font-size: 1.9rem; }
    .hero-desc           { font-size: 0.9rem; }
    .journey-header      { padding: 1rem 1.1rem; }
    .journey-preview     { padding: 0.9rem 1.1rem 1rem; }
    .journey-full-inner  { padding: 0.9rem 1.1rem 1.1rem; }
}
