/* ============================================
   郭先生简历 - 高质量设计版
   ============================================ */

/* Variables */
:root {
    --bg: #0f0f13;
    --bg-card: #1a1a22;
    --bg-elevated: #22222d;
    --text: #f0f0f5;
    --text-dim: #8888a0;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --border: rgba(255, 255, 255, 0.08);
    --font: 'Noto Sans SC', 'Space Grotesk', system-ui, sans-serif;
    --mono: 'Space Grotesk', 'SF Mono', monospace;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

ul { list-style: none; }

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Section Numbers & Titles */
.section-num {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem 0;
    background: rgba(15, 15, 19, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.85rem;
    color: var(--text-dim);
    transition: color 0.2s;
}

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

/* ============================================
   Hero
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-left {
    max-width: 440px;
}

.hero-tag {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tag-line {
    width: 40px;
    height: 2px;
    background: var(--accent);
}

.hero-tag span:last-child {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-title {
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
    font-size: clamp(3rem, 7vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.title-line[data-delay="1"] {
    animation-delay: 0.15s;
}

.title-line.accent {
    color: var(--accent);
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-dim);
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.3s forwards;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn 1s ease 0.4s forwards;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.5s forwards;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.875rem 2rem;
    background: var(--accent);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    padding: 0.875rem 2rem;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s;
}

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

.hero-right {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding-bottom: 4rem;
    padding-right: 0;
    opacity: 0;
    animation: fadeIn 1s ease 0.6s forwards;
}

.hero-right .tagcloud-wrapper {
    --tagcloud-diameter: 26rem;
    transform: translate(2rem, 2rem);
}

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

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}


/* 3D Tag Cloud */
.tagcloud-wrapper {
    --tagcloud-diameter: 28rem;
    --tag-font-color: 255, 255, 255;
    width: var(--tagcloud-diameter);
    aspect-ratio: 1 / 1;
    position: relative;
    font-family: var(--mono);
    perspective: calc(var(--tagcloud-diameter) * 2);
    transform-style: preserve-3d;
}

.tagcloud-rotation {
    position: absolute;
    width: 100%;
    aspect-ratio: 1 / 1;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transform-style: preserve-3d;
}

.tagcloud-tags {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.tagcloud-tag {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.tagcloud-tag a {
    pointer-events: auto;
    display: inline-block;
    padding: 0.3rem 0.75rem;
    color: rgb(var(--tag-font-color));
    text-decoration: none;
    white-space: nowrap;
    border-radius: 4px;
    transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease;
    text-shadow:
        1px 1px 2px rgba(0, 0, 0, 0.6),
        -1px -1px 2px rgba(0, 0, 0, 0.6),
        0 0 8px rgba(0, 0, 0, 0.4);
}

.tagcloud-tag a:hover {
    color: var(--accent-light);
    text-shadow:
        0 0 10px rgba(99, 102, 241, 0.5),
        1px 1px 2px rgba(0, 0, 0, 0.6);
}

.tagcloud-wrapper:hover .tagcloud-tag:not(.hovered) {
    opacity: 0.15 !important;
}

.tagcloud-tag.hovered {
    opacity: 1 !important;
}

.tagcloud-tag.hovered a {
    transform: scale(1.3);
}

/* ============================================
   Projects
   ============================================ */
.projects {
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
    background: var(--bg);
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(180deg, var(--bg) 0%, transparent 100%);
    z-index: 3;
    pointer-events: none;
}

.projects::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(0deg, var(--bg) 0%, transparent 100%);
    z-index: 3;
    pointer-events: none;
}

.projects-video-bg {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.projects-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.projects-overlay {
    display: none;
}

.projects-header {
    position: relative;
    z-index: 2;
    margin-bottom: 3rem;
    text-align: center;
}

.projects-desc {
    color: var(--text-dim);
    margin-top: 1rem;
    line-height: 1.7;
}

.projects-list {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.street-lamp {
    width: 100px;
}

.lamp-svg {
    width: 100%;
    height: auto;
    transition: all 0.8s ease;
}

.lamp-pole,
.lamp-base,
.lamp-arm,
.lamp-shade {
    transition: all 0.8s ease;
}

.lamp-bulb {
    transition: all 0.8s ease;
}

.lamp-glow,
.lamp-ground-glow {
    transition: opacity 1.2s ease;
}

/* 路灯亮起状态 */
.street-lamp.active .lamp-bulb {
    fill: #fff8e0;
    stroke: #ffd700;
    filter: drop-shadow(0 0 8px #ffd700);
}

.street-lamp.active .lamp-glow {
    opacity: 1;
}

.street-lamp.active .lamp-ground-glow {
    opacity: 1;
}

.street-lamp.active .lamp-shade {
    fill: #3a3a4a;
}

.street-lamp.active .lamp-pole,
.street-lamp.active .lamp-arm {
    filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.3));
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-card {
    display: grid;
    grid-template-columns: 60px 1fr auto auto;
    gap: 2rem;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(26, 26, 34, 0.85);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateX(8px);
}

.project-index {
    font-family: var(--mono);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--accent);
    opacity: 0.5;
}

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

.project-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.project-card:hover .project-name {
    color: var(--accent-light);
}

.project-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
}

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

.project-tags span {
    font-size: 0.75rem;
    color: var(--text-dim);
    padding: 0.35rem 0.75rem;
    background: var(--bg-elevated);
    border-radius: 4px;
}

.project-arrow {
    font-size: 1.25rem;
    color: var(--text-dim);
    transition: all 0.3s;
}

.project-card:hover .project-arrow {
    color: var(--accent);
    transform: translateX(4px);
}

/* ============================================
   Experience
   ============================================ */
.experience {
    padding: 8rem 0;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.experience::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(180deg, var(--bg) 0%, transparent 100%);
    z-index: 1;
}

.experience::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(0deg, var(--bg) 0%, transparent 100%);
    z-index: 1;
}

.experience-video-bg {
    position: absolute;
    left: 0;
    top: 0;
    width: 38%;
    height: 100%;
    z-index: 0;
}

.experience-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mask-image: linear-gradient(90deg, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, black 60%, transparent 100%);
}

.experience-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, var(--bg) 0%, transparent 12%, transparent 88%, var(--bg) 100%);
}

.experience-header {
    position: relative;
    z-index: 2;
    margin-bottom: 3rem;
    margin-left: 42%;
}

.experience-desc {
    color: var(--text-dim);
    margin-top: 1rem;
    line-height: 1.7;
}

.experience .timeline {
    max-width: 520px;
    position: relative;
    z-index: 2;
    margin-left: 42%;
}

.experience-right {
    display: flex;
    flex-direction: column;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6rem;
    bottom: 0.6rem;
    width: 1px;
    background: linear-gradient(180deg, var(--accent), rgba(99, 102, 241, 0.2));
}

.timeline-item {
    position: relative;
    padding: 0 0 2.5rem 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.55rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--text-dim);
    box-shadow: 0 0 0 3px var(--bg);
    transform: translateX(-4px);
    transition: all 0.3s;
}

.timeline-item.current::before {
    background: #a855f7;
    box-shadow: 0 0 0 3px var(--bg), 0 0 12px rgba(168, 85, 247, 0.5);
}

.timeline-company {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.timeline-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.4rem;
}

.timeline-year {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.timeline-role {
    font-size: 0.88rem;
    color: var(--text-dim);
}

.timeline-tech {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--accent-light);
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.timeline-list li {
    font-size: 0.88rem;
    color: var(--text-dim);
    padding-left: 1rem;
    position: relative;
    line-height: 1.6;
}

.timeline-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 5px;
    height: 1px;
    background: var(--accent);
    opacity: 0.6;
}

/* ============================================
   Contact
   ============================================ */
.contact {
    padding: 8rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-lamp-wrap {
    display: flex;
    justify-content: center;
}

.contact-lamp-wrap .street-lamp {
    width: 100px;
}

.contact-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-desc {
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    padding-bottom: 1.5rem;
    border-bottom: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C200,120 400,0 600,60 C800,120 1000,0 1200,60' fill='none' stroke='%23818cf8' stroke-width='2'/%3E%3C/svg%3E");
    background-size: 50% 10px;
    background-repeat: repeat-x;
    background-position: bottom;
    animation: waveMove 3s linear infinite;
}

.contact-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    background-image: none;
    animation: none;
}

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

.contact-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

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

.contact-link {
    display: inline-block;
    transition: color 0.2s;
}

.contact-link:hover {
    color: var(--accent-light);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-dim);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-light);
}

/* ============================================
   Animations
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-content {
        padding: 0 1.5rem;
        max-width: 100%;
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-left {
        text-align: center;
        max-width: 100%;
    }

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

    .title-line {
        font-size: 2.5rem;
    }

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

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

    .hero-right {
        align-items: center;
        justify-content: center;
        padding: 0;
        transform: translateX(-10VW);
    }

    .hero-right .tagcloud-wrapper {
        --tagcloud-diameter: 18rem;
        transform: none;
    }

    .projects-video-bg {
        left: 0;
        right: 0;
        width: 100%;
    }

    .projects-overlay {
        background: rgba(15, 15, 19, 0.7);
    }

    .projects-header {
        text-align: center;
    }

    .projects-list {
        max-width: 100%;
    }

    .project-card {
        grid-template-columns: 50px 1fr auto;
    }

    .project-tags {
        display: none;
    }

    .timeline-item {
        padding-left: 1.5rem;
    }

    .experience-header {
        margin-left: 0;
        text-align: center;
    }

    .experience .timeline {
        margin-left: 0;
        max-width: 100%;
    }

    .experience-video-bg {
        width: 100%;
        opacity: 0.15;
    }

    .experience-video {
        mask-image: linear-gradient(180deg, transparent 0%, black 20%, black 80%, transparent 100%);
        -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 20%, black 80%, transparent 100%);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-lamp-wrap .street-lamp {
        width: 80px;
    }
}
