/* ========== Reset & Base ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a14;
    --bg-secondary: #0f0f1a;
    --text-primary: #e8e6f0;
    --text-secondary: #9896a8;
    --accent-purple: #8b5cf6;
    --accent-purple-dim: rgba(139, 92, 246, 0.15);
    --accent-gold: #d4a853;
    --accent-gold-dim: rgba(212, 168, 83, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: rgba(0, 0, 0, 0.3);
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Noto Sans SC', 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* ========== Canvas Particles ========== */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ========== Navigation ========== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 3rem;
    background: rgba(10, 10, 20, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-purple);
    transition: width 0.3s ease;
}

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

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

/* ========== Hero Section ========== */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.hero-content {
    max-width: 800px;
}

.hero-greeting {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent-purple);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.3s forwards;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

.name-main {
    display: block;
    background: linear-gradient(135deg, #fff 0%, #c4b5fd 50%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.name-divider {
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-gold));
    margin: 1rem auto;
}

.name-sub {
    display: block;
    font-size: 0.35em;
    letter-spacing: 12px;
    color: var(--text-secondary);
    -webkit-text-fill-color: var(--text-secondary);
    font-weight: 400;
}

.hero-tagline {
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-weight: 300;
    max-width: 550px;
    margin: 0 auto 4rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.9s forwards;
}

.hero-tagline em {
    font-style: normal;
    color: var(--accent-purple);
    font-weight: 500;
}

.hero-scroll {
    opacity: 0;
    animation: fadeInUp 0.8s ease 1.2s forwards;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.hero-scroll span {
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(180deg, var(--accent-purple), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

/* ========== Sections Common ========== */
.section {
    position: relative;
    z-index: 1;
    padding: 8rem 2rem;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    margin: -2.5rem 0 2.5rem;
    text-align: center;
    font-size: 1rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* ========== Glass Card ========== */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px var(--glass-shadow);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.2);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.08);
}

/* ========== About Section ========== */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    align-items: start;
}

.about-card {
    padding: 2.5rem;
}

.about-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.about-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.9;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-symbol {
    font-family: var(--font-mono);
    font-size: 2rem;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* ========== Interests Section ========== */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.interest-card {
    display: block;
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.interest-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.interest-link:hover .interest-icon {
    transform: scale(1.08);
}

.interest-icon {
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
    display: block;
    transition: transform 0.3s ease;
}

.interest-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.interest-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========== Research Section ========== */
.research-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-left: 3rem;
}

.research-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-purple), var(--accent-gold), transparent);
}

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

.timeline-dot {
    position: absolute;
    left: calc(-3rem + 1px);
    top: 2.2rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--accent-purple);
    box-shadow: 0 0 12px var(--accent-purple-dim);
}

.timeline-item h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.timeline-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ========== Journey Section ========== */
.journey-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.journey-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.journey-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.journey-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.journey-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.journey-quote {
    max-width: 600px;
    margin: 0 auto;
}

.journey-quote blockquote {
    text-align: center;
    padding: 2.5rem;
    border-left: 3px solid var(--accent-gold);
}

.journey-quote p {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.journey-quote cite {
    font-size: 0.9rem;
    color: var(--accent-gold);
    font-style: normal;
}

/* ========== Contact Section ========== */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-card {
    text-align: center;
    padding: 3rem;
}

.contact-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.contact-link:hover {
    color: var(--accent-purple);
    border-color: var(--accent-purple);
    background: var(--accent-purple-dim);
}

.contact-email {
    cursor: pointer;
    position: relative;
}

.contact-email .copy-toast {
    position: absolute;
    top: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-purple);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.contact-email .copy-toast.show {
    opacity: 1;
}

.contact-link svg {
    width: 18px;
    height: 18px;
}

/* ========== Footer ========== */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    border-top: 1px solid var(--glass-border);
}

/* ========== Books Page ========== */
.books-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 6.5rem 2rem 3rem;
}

.books-hero {
    max-width: 760px;
    margin: 0 auto 2.2rem;
    text-align: center;
}

.books-kicker {
    font-family: var(--font-mono);
    color: var(--accent-purple);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.books-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #fff 0%, #c4b5fd 55%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.books-description {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 0.96rem;
}

.books-content {
    max-width: 1020px;
    margin: 0 auto;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
}

.book-card {
    display: block;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    padding: 0.9rem;
}

.book-card-downloadable {
    cursor: pointer;
}

.book-card-static {
    cursor: default;
}

.book-cover {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4.15;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.book-card:hover .book-cover {
    transform: scale(1.04);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.book-info {
    padding: 0.9rem 0 0.2rem;
}

.book-name {
    font-family: var(--font-display);
    font-size: 0.96rem;
    line-height: 1.35;
    margin-bottom: 0.35rem;
}

.book-author {
    color: var(--text-secondary);
    font-size: 0.84rem;
    margin-bottom: 0.65rem;
}

.book-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent-gold);
    font-size: 0.76rem;
    letter-spacing: 0.6px;
}

.book-card-static .book-action {
    color: var(--text-secondary);
}

.books-empty {
    max-width: 480px;
    margin: 3rem auto 0;
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-secondary);
}

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

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .section {
        padding: 5rem 1.5rem;
    }

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

    .about-stats {
        grid-template-columns: repeat(4, 1fr);
    }

    .interests-grid,
    .journey-grid {
        grid-template-columns: 1fr;
    }

    .research-timeline {
        padding-left: 2rem;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .books-shell {
        padding: 7rem 1.5rem 3.5rem;
    }

    .books-hero {
        margin-bottom: 2.5rem;
    }

    .books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .section-subtitle {
        margin-top: -2rem;
        font-size: 0.95rem;
    }

    .book-card {
        padding: 1rem;
    }

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

    .books-empty {
        font-size: 1.25rem;
    }
}
