/* ========================================
   涵曦 · 个人主页
   设计风格：简约 · 温暖 · 东方美学
   ======================================== */

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主色调 - 温暖大地色系 */
    --primary: #c9a96e;
    --primary-dark: #b8944f;
    --primary-light: #e8d5b0;

    /* 中性色 */
    --bg: #faf8f5;
    --bg-alt: #f5f0eb;
    --text: #2c2c2c;
    --text-light: #6b6b6b;
    --text-muted: #999;
    --border: #e8e0d8;
    --white: #ffffff;

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.1);

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    /* 过渡 */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    /* 字体 */
    --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Noto Serif SC', Georgia, serif;
}

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

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

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

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

section {
    padding: 100px 0;
}

/* ---------- 通用组件 ---------- */

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.divider {
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: 0 auto;
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-sans);
    letter-spacing: 0.5px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201, 169, 110, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
}

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

.btn-block {
    width: 100%;
}

/* ---------- 导航栏 ---------- */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 0;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.05);
}

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

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    font-family: var(--font-serif);
    color: var(--text);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-light);
    position: relative;
    padding-bottom: 4px;
}

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

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

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

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- 首屏 Hero ---------- */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.hero-bg {
    position: absolute;
    top: -50%;
    right: -30%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(201, 169, 110, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    padding-top: 80px;
}

.hero-text {
    flex: 1;
}

.hero-greeting {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 12px;
}

.hero-name {
    font-size: 4rem;
    font-weight: 700;
    font-family: var(--font-serif);
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 16px;
}

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

.hero-desc {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.hero-social {
    display: flex;
    gap: 20px;
}

.hero-social a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-alt);
    color: var(--text-light);
    font-size: 1.2rem;
    transition: var(--transition);
}

.hero-social a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

/* 头像圆形动画 */
.hero-visual {
    flex: 0 0 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-avatar-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-avatar {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 20px 60px rgba(201, 169, 110, 0.3);
}

.hero-avatar span {
    font-size: 4rem;
    font-weight: 700;
    font-family: var(--font-serif);
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--primary-light);
    animation: ringPulse 3s ease-in-out infinite;
}

.ring-1 {
    width: 320px;
    height: 320px;
    animation-delay: 0s;
}

.ring-2 {
    width: 280px;
    height: 280px;
    animation-delay: 0.5s;
}

@keyframes ringPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.2;
    }
}

/* 滚动提示 */
.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 2px;
    animation: float 2s ease-in-out infinite;
}

.scroll-arrow {
    width: 1px;
    height: 30px;
    background: linear-gradient(to bottom, var(--text-muted), transparent);
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ---------- 关于我 ---------- */

.about {
    background: var(--white);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-image {
    flex: 0 0 360px;
}

.about-img-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: var(--radius-md);
    background: var(--bg-alt);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 1rem;
    border: 2px dashed var(--border);
    transition: var(--transition);
}

.about-img-placeholder i {
    font-size: 2.5rem;
    color: var(--primary-light);
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.9;
}

.about-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 28px 0;
}

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

.info-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

.info-value {
    font-size: 1rem;
    color: var(--text);
    font-weight: 500;
}

/* ---------- 服务 ---------- */

.services {
    background: var(--bg-alt);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.service-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--white);
}

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ---------- 作品集 ---------- */

.portfolio {
    background: var(--white);
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 24px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-sans);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.portfolio-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.portfolio-img {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.placeholder-img {
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 2px;
    transition: var(--transition-slow);
}

.portfolio-item:hover .placeholder-img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: var(--white);
    transform: translateY(30px);
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-overlay h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.portfolio-overlay p {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ---------- 统计数据 ---------- */

.stats {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 80px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-item {
    color: var(--white);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    font-family: var(--font-serif);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.95rem;
    opacity: 0.85;
    letter-spacing: 1px;
}

/* ---------- 联系 ---------- */

.contact {
    background: var(--bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
}

.contact-info h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.contact-info > p {
    color: var(--text-light);
    margin-bottom: 32px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-light);
}

.contact-item i {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 50%;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.contact-social {
    display: flex;
    gap: 12px;
}

.contact-social a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--white);
    color: var(--text-light);
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.contact-social a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

/* 表单 */
.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.1);
    background: var(--white);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ---------- 页脚 ---------- */

.footer {
    background: var(--text);
    color: rgba(255, 255, 255, 0.85);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 16px;
    display: inline-block;
}

.footer-brand p {
    font-size: 0.9rem;
    opacity: 0.7;
    line-height: 1.8;
}

.footer-links h4,
.footer-newsletter h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 0.9rem;
    opacity: 0.7;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary-light);
}

.footer-newsletter p {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 16px;
}

.newsletter-form {
    display: flex;
    gap: 0;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    font-family: var(--font-sans);
    outline: none;
    font-size: 0.9rem;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.newsletter-form button {
    padding: 12px 20px;
    background: var(--primary);
    border: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--primary-dark);
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ---------- 动画（滚动触发） ---------- */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- 响应式设计 ---------- */

@media (max-width: 1024px) {
    .hero-name {
        font-size: 3rem;
    }

    .hero-visual {
        flex: 0 0 280px;
    }

    .hero-avatar-wrapper {
        width: 260px;
        height: 260px;
    }

    .hero-avatar {
        width: 180px;
        height: 180px;
    }

    .hero-avatar span {
        font-size: 3rem;
    }

    .ring-1 {
        width: 260px;
        height: 260px;
    }

    .ring-2 {
        width: 220px;
        height: 220px;
    }

    .about-content {
        gap: 40px;
    }

    .about-image {
        flex: 0 0 300px;
    }
}

@media (max-width: 768px) {
    section {
        padding: 70px 0;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    /* 导航 */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 32px;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.08);
        transition: var(--transition);
        z-index: 999;
    }

    .nav-links.open {
        right: 0;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    /* Hero */
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 40px;
    }

    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-desc {
        max-width: 100%;
    }

    .hero-visual {
        flex: 0 0 auto;
    }

    .hero-avatar-wrapper {
        width: 220px;
        height: 220px;
    }

    .hero-avatar {
        width: 150px;
        height: 150px;
    }

    .hero-avatar span {
        font-size: 2.5rem;
    }

    .ring-1 {
        width: 220px;
        height: 220px;
    }

    .ring-2 {
        width: 190px;
        height: 190px;
    }

    .hero-name {
        font-size: 2.5rem;
    }

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

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

    .scroll-hint {
        display: none;
    }

    /* 关于 */
    .about-content {
        flex-direction: column;
    }

    .about-image {
        flex: 0 0 auto;
        width: 260px;
    }

    .about-info {
        grid-template-columns: 1fr;
    }

    /* 统计 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .stat-number {
        font-size: 2.2rem;
    }

    /* 联系 */
    .contact-content {
        grid-template-columns: 1fr;
    }

    /* 页脚 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-links {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-name {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

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

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 24px;
    }
}

/* ---------- 选中等高线 ---------- */

::selection {
    background: var(--primary);
    color: var(--white);
}

/* ---------- 滚动条美化 ---------- */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}
