/* ========================================
   曹志鹏 - 小草 | 法学生兼职球场中锋
   四页设计 · 仿宋白色字体 · 动态线条环绕
   ======================================== */

:root {
    --primary: #c41e3a;
    --primary-dark: #8b0000;
    --accent: #ffd700;
    --bg-dark: #1a1a2e;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.8);
    --font-fang: 'FangSong', 'FangSong_GB2312', 'STFangsong', serif;
    --font-sans: 'Noto Sans SC', -apple-system, sans-serif;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --radius: 16px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-snap-type: y mandatory; }

body {
    font-family: var(--font-sans);
    background: var(--bg-dark);
    color: var(--text);
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

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

.page-section {
    width: 100%;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
}

.page-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.bg-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

.bg-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2d3436, #000000, #1a1a2e);
}

.bg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.page-content {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 120px;
}

/* ====== 首页 ====== */
.flag-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease;
}

.flag {
    width: 80px;
    height: 54px;
    background: linear-gradient(to bottom, #de2910 0%, #de2910 20%, #ffde00 20%, #ffde00 40%, #de2910 40%, #de2910 60%, #ffde00 60%, #ffde00 80%, #de2910 80%);
    position: relative;
    border: 1px solid #ffde00;
    animation: flagWave 3s ease-in-out infinite;
    transform-origin: left center;
}

@keyframes flagWave {
    0%, 100% { transform: skewY(0deg); }
    25% { transform: skewY(-2deg); }
    75% { transform: skewY(2deg); }
}

.flag-star-large {
    position: absolute;
    top: 12%;
    left: 12%;
}

.flag-star-small {
    position: absolute;
}

.star {
    width: 10px;
    height: 10px;
    background: #ffde00;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.flag-star-small .star {
    width: 5px;
    height: 5px;
}

.flag-text {
    font-family: var(--font-fang);
    font-size: 1.2rem;
    color: var(--accent);
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
}

.avatar-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 30px;
}

.avatar-ring {
    position: absolute;
    inset: -20px;
}

.orbit-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 220px;
    height: 220px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: orbitRotate 8s linear infinite;
}

.orbit-line:nth-child(2) {
    animation-direction: reverse;
    animation-duration: 10s;
}

.orbit-line:nth-child(3) {
    animation-direction: reverse;
    animation-duration: 12s;
    border-style: dashed;
}

@keyframes orbitRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    position: relative;
    z-index: 2;
    transition: var(--transition);
}

.avatar:hover {
    transform: scale(1.05);
}

.hero-title {
    font-family: var(--font-fang);
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--text);
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-slogans {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
}

.slogan-item {
    font-family: var(--font-fang);
    font-size: 1.1rem;
    color: var(--text-muted);
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.slogan-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.scroll-btn {
    position: absolute;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 2rem;
    animation: bounce 2s infinite;
    transition: var(--transition);
}

.scroll-btn:hover { color: var(--accent); }

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(10px); }
    60% { transform: translateY(5px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ====== 第二页：技能 ====== */
.skills-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.basketball-3d {
    position: relative;
    width: 200px;
    height: 200px;
}

.ball {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at 30% 30%, #ff6b35, #e65100);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: inset -10px -10px 30px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: ballPulse 3s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes ballPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

.ball-line-h {
    position: absolute;
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.3);
}

.ball-line-v {
    position: absolute;
    width: 3px;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.ball-text {
    font-family: var(--font-fang);
    font-size: 1.2rem;
    color: white;
    font-weight: bold;
    z-index: 1;
}

.orbit-tags {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: tagsRotate 15s linear infinite;
}

.orbit-tags .tag {
    position: absolute;
    padding: 6px 12px;
    background: var(--accent);
    color: #000;
    border-radius: 20px;
    font-size: 0.85rem;
    font-family: var(--font-fang);
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.tag:nth-child(1) { top: -15px; left: 50%; transform: translateX(-50%); }
.tag:nth-child(2) { top: 10%; right: -50px; }
.tag:nth-child(3) { top: 45%; right: -60px; }
.tag:nth-child(4) { bottom: 10%; right: -50px; }
.tag:nth-child(5) { bottom: -15px; left: 50%; transform: translateX(-50%); }
.tag:nth-child(6) { bottom: 10%; left: -50px; }
.tag:nth-child(7) { top: 10%; left: -40px; }

@keyframes tagsRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.personal-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 600px;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.info-item:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-3px);
}

.info-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

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

.skills-right {
    margin-top: 40px;
}

.skills-quote {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: var(--font-fang);
    font-size: 1.3rem;
    color: var(--text);
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    border-left: 4px solid var(--accent);
}

/* ====== 第三页：档案 ====== */
.photo-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 1200px;
}

.photo-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.photo-card:hover {
    transform: translateY(-10px);
}

.photo-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.photo-lines {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 49%, rgba(255, 215, 0, 0.3) 50%, transparent 51%),
        linear-gradient(0deg, transparent 49%, rgba(255, 215, 0, 0.3) 50%, transparent 51%);
    background-size: 30px 30px;
    animation: linesMove 10s linear infinite;
    pointer-events: none;
}

@keyframes linesMove {
    0% { background-position: 0 0; }
    100% { background-position: 30px 30px; }
}

.photo-desc {
    padding: 20px;
    background: rgba(26, 26, 46, 0.95);
}

.photo-desc p {
    font-family: var(--font-fang);
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 8px;
}

/* ====== 第四页：座右铭 ====== */
.motto-wrapper {
    text-align: center;
}

.motto-text {
    display: flex;
    flex-direction: column;
    font-family: var(--font-fang);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--accent);
    line-height: 1.4;
    margin-bottom: 50px;
    text-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.contact-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.contact-section i {
    font-size: 1.5rem;
    color: var(--accent);
}

.contact-section a {
    font-family: var(--font-fang);
    font-size: 1.2rem;
    color: var(--text);
    transition: var(--transition);
}

.contact-section a:hover { color: var(--accent); }

/* ====== 导航按钮 ====== */
.page-nav {
    position: fixed;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 100;
}

.nav-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid var(--accent);
    border-radius: 50%;
    color: var(--accent);
    font-size: 1.2rem;
    transition: var(--transition);
}

.nav-btn:hover {
    background: var(--accent);
    color: #000;
    transform: scale(1.1);
}

/* ====== 响应式 ====== */
@media (max-width: 992px) {
    .photo-cards { grid-template-columns: repeat(2, 1fr); }
    .personal-info-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    html { scroll-snap-type: none; }

    .flag-container { flex-direction: column; gap: 10px; }
    .flag { width: 60px; height: 40px; }
    .flag-text { font-size: 1rem; }

    .avatar-wrapper { width: 140px; height: 140px; }
    .hero-title { font-size: 1.8rem; }
    .slogan-item { font-size: 0.95rem; padding: 8px 16px; }

    .photo-cards { grid-template-columns: 1fr; }
    .photo-img { height: 200px; }

    .personal-info-grid { grid-template-columns: repeat(2, 1fr); }

    .skills-quote { font-size: 1rem; padding: 20px; }

    .motto-text { font-size: 1.8rem; }

    .page-nav { bottom: 20px; gap: 10px; }
    .nav-btn { width: 40px; height: 40px; font-size: 1rem; }
}

@media (max-width: 480px) {
    .basketball-3d { width: 150px; height: 150px; }
    .ball { width: 100px; height: 100px; }
    .orbit-tags .tag { padding: 4px 8px; font-size: 0.75rem; }
}

/* ====== 滚动条 ====== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

.tech-footer {
    background: var(--bg-dark);
    padding: 30px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.tech-support {
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
}

.tech-support a {
    color: var(--accent);
    transition: color 0.3s;
}

.tech-support a:hover {
    color: var(--text);
    text-decoration: underline;
}
