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

:root {
    --bg: #fafafa;
    --bg-surface: rgba(0, 0, 0, 0.03);
    --text: #1a1a1a;
    --text-muted: #666666;
    --accent: #3b5fcc;
    --accent-glow: rgba(59, 95, 204, 0.25);
    --gradient: linear-gradient(135deg, #3b5fcc, #8b5cf6, #d946ef);
    --border: rgba(0, 0, 0, 0.08);
    --nav-bg: rgba(250, 250, 250, 0.85);
    --social-bg: rgba(0, 0, 0, 0.05);
    --social-border: rgba(0, 0, 0, 0.1);
    --social-hover-bg: rgba(0, 0, 0, 0.1);
    --hero-glow-1: rgba(59, 95, 204, 0.08);
    --hero-glow-2: rgba(139, 92, 246, 0.06);
    --hero-glow-3: rgba(217, 70, 239, 0.04);
    --timeline-line: rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --nav-height: 72px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0a0a0a;
        --bg-surface: rgba(255, 255, 255, 0.03);
        --text: #f0f0f0;
        --text-muted: #888888;
        --accent: #4d7cff;
        --accent-glow: rgba(77, 124, 255, 0.3);
        --gradient: linear-gradient(135deg, #4d7cff, #a855f7, #ec4899);
        --border: rgba(255, 255, 255, 0.06);
        --nav-bg: rgba(10, 10, 10, 0.85);
        --social-bg: rgba(255, 255, 255, 0.06);
        --social-border: rgba(255, 255, 255, 0.1);
        --social-hover-bg: rgba(255, 255, 255, 0.12);
        --hero-glow-1: rgba(77, 124, 255, 0.12);
        --hero-glow-2: rgba(168, 85, 247, 0.08);
        --hero-glow-3: rgba(236, 72, 153, 0.06);
        --timeline-line: rgba(255, 255, 255, 0.08);
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

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

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.3s;
    position: relative;
}

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

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
    border-radius: 1px;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero (Homepage) ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, var(--hero-glow-1), transparent),
        radial-gradient(ellipse 60% 50% at 30% 70%, var(--hero-glow-2), transparent),
        radial-gradient(ellipse 50% 40% at 80% 20%, var(--hero-glow-3), transparent);
    animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% { opacity: 0.6; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeUp 1s ease-out;
}

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

.hero-photo {
    margin-bottom: 32px;
}

.photo-img {
    width: 140px;
    height: 140px;
    margin: 0 auto;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    box-shadow: 0 0 60px var(--accent-glow);
    animation: photoGlow 4s ease-in-out infinite alternate;
    border: 3px solid transparent;
    background: var(--gradient) border-box;
    background-clip: padding-box;
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.photo-placeholder {
    width: 140px;
    height: 140px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 0 60px var(--accent-glow);
    animation: photoGlow 4s ease-in-out infinite alternate;
}

@keyframes photoGlow {
    0% { box-shadow: 0 0 40px var(--accent-glow); }
    100% { box-shadow: 0 0 80px var(--accent-glow), 0 0 120px rgba(139, 92, 246, 0.1); }
}

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 12px;
}

.hero-tagline {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto 40px;
}

.hero-links {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.social-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--social-bg);
    border: 1px solid var(--social-border);
    color: var(--text-muted);
    transition: all 0.3s;
}

.social-link svg {
    width: 22px;
    height: 22px;
}

.social-link:hover {
    background: var(--social-hover-bg);
    color: var(--text);
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

/* ===== About Page ===== */
.about {
    max-width: 800px;
    margin: 0 auto;
    padding: calc(var(--nav-height) + 48px) 24px 80px;
}

.about-hero {
    margin-bottom: 64px;
}

.about-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-intro {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 600px;
}

/* Manifesto */
.manifesto p {
    font-size: 1.2rem;
    line-height: 1.9;
    color: var(--text-muted);
    margin-bottom: 16px;
    max-width: 620px;
}

.manifesto p:first-child {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}

.manifesto em {
    font-style: italic;
    color: var(--text);
}

.manifesto strong {
    color: var(--accent);
    font-weight: 700;
}

/* Q&A Cards */
.qa-section {
    margin-bottom: 64px;
}

.qa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.qa-card {
    padding: 28px;
    border-radius: var(--radius);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.qa-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 24px var(--accent-glow);
}

.qa-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--accent);
}

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

/* Beliefs */
.beliefs-section {
    margin-bottom: 64px;
}

.beliefs-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.beliefs-list li {
    font-size: 1.05rem;
    color: var(--text-muted);
    padding-left: 24px;
    position: relative;
    line-height: 1.6;
}

.beliefs-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

/* Section titles */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 32px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
}

/* Timeline */
.timeline-section {
    margin-bottom: 64px;
}

.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--timeline-line);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

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

.timeline-marker {
    position: absolute;
    left: -38px;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    display: inline-block;
    margin-bottom: 8px;
}

.timeline-company {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.timeline-content p:last-child {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Skills */
.skills-section {
    margin-bottom: 64px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}

.skill-group h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: 20px;
    background: var(--social-bg);
    border: 1px solid var(--social-border);
    color: var(--text);
    transition: all 0.3s;
}

.skill-tag:hover {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

/* Education */
.education-section {
    margin-bottom: 64px;
}

.education-card {
    padding: 24px;
    border-radius: var(--radius);
    background: var(--bg-surface);
    border: 1px solid var(--border);
}

.education-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.education-school {
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* ===== Scroll Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

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

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--nav-bg);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 16px 0;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s, opacity 0.3s;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 14px 24px;
        font-size: 1.1rem;
    }

    .nav-links a.active::after {
        display: none;
    }

    .hero-name {
        letter-spacing: -1px;
    }

    .photo-img,
    .photo-placeholder {
        width: 120px;
        height: 120px;
        font-size: 2rem;
    }

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

@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}
