:root {
    --bg-dark: #0a0a0c;
    --text-main: #f0f0f5;
    --text-dim: #a1a1aa;
    --accent-color: #6366f1;
    /* Indigo */
    --accent-glow: rgba(99, 102, 241, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --level-1: #10b981;
    /* Emerald */
    --level-2: #3b82f6;
    /* Blue */
    --level-master: #8b5cf6;
    /* Violet */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.bg-grad-1 {
    position: fixed;
    top: -20vh;
    left: -10vw;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(10, 10, 12, 0) 70%);
    z-index: -2;
    filter: blur(80px);
}

.bg-grad-2 {
    position: fixed;
    bottom: -20vh;
    right: -10vw;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, rgba(10, 10, 12, 0) 70%);
    z-index: -2;
    filter: blur(100px);
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.03;
    z-index: -1;
    pointer-events: none;
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(10, 10, 12, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100; /* Lowered from 1000 to avoid blocking Coze SDK */
    transition: all 0.3s ease;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #fff, #a1a1aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-main);
}

/* General Layout */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 100px 0;
    min-height: auto;
}

/* Typography elements */
.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.heading-line {
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 1rem 0;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-glow);
}

.subtitle {
    color: var(--text-dim);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Glass Card Component */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.profile-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 2rem;
    border-radius: 50%;
    margin-top: -5vh;
    animation: floatingProfile 4s ease-in-out infinite;
}

@keyframes floatingProfile {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

.profile-glow {
    position: absolute;
    top: -5%;
    left: -5%;
    right: -5%;
    bottom: -5%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent-color), transparent, var(--level-master), transparent);
    animation: rotate 8s linear infinite;
    filter: blur(15px);
    opacity: 0.6;
    z-index: 1;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.4);
    background-color: #1a1a24;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    animation: breathingGlow 4s ease-in-out infinite alternate;
}

@keyframes breathingGlow {
    0% {
        box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(99, 102, 241, 0.3);
    }

    100% {
        box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 0 35px rgba(139, 92, 246, 0.6);
    }
}

.profile-container:hover .profile-image {
    transform: scale(1.05);
    animation-play-state: paused;
}

.greeting {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    height: 3.5rem;
    /* prevent layout shift */
}

.cursor {
    display: inline-block;
    width: 3px;
    animation: blink 1s infinite;
    color: var(--accent-color);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.tags-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.glass-pill {
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.3s ease;
    cursor: default;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.tag-pm {
    color: #e879f9;
    /* Fuchsia */
    border-color: rgba(232, 121, 249, 0.3);
    background: rgba(232, 121, 249, 0.05);
}

.tag-pm:hover {
    box-shadow: 0 0 15px rgba(232, 121, 249, 0.2);
    border-color: rgba(232, 121, 249, 0.5);
    transform: translateY(-2px);
}

.tag-trainer {
    color: #38bdf8;
    /* Sky Blue */
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(56, 189, 248, 0.05);
}

.tag-trainer:hover {
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.5);
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dim);
    font-size: 0.75rem;
    letter-spacing: 2px;
    opacity: 0.6;
}

.mouse {
    width: 24px;
    height: 36px;
    border: 2px solid var(--text-dim);
    border-radius: 12px;
    position: relative;
    display: flex;
    justify-content: center;
}

.wheel {
    width: 4px;
    height: 6px;
    background: var(--text-dim);
    border-radius: 2px;
    margin-top: 6px;
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(12px);
        opacity: 0;
    }
}

/* Prologue */
.prologue-card {
    position: relative;
    overflow: hidden;
}

.quote-icon {
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.03);
    z-index: 0;
}

.prologue-text {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dim);
}

.personal-quote {
    margin-top: 1.5rem;
    padding: 2rem;
    font-family: 'Georgia', serif;
    /* Or any custom elegant serif/cursive */
    font-size: 1.25rem;
    line-height: 1.9;
    color: #e2e8f0;
    font-style: italic;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
    border-left: 4px solid var(--accent-color);
    border-radius: 0 12px 12px 0;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.placeholder-text {
    font-style: italic;
    color: rgba(161, 161, 170, 0.5);
}

/* Showcase */
.portfolio-highlight {
    margin-bottom: 2rem;
}

.flex-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    color: var(--text-main);
    padding: 1.5rem 2rem;
}

.interactable:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.flex-card .icon-box {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: #818cf8;
}

.flex-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flex-card h3 i {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.flex-card p {
    color: var(--text-dim);
    font-size: 0.95rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.skill-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.skill-icon {
    font-size: 2rem;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

.skill-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.skill-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Experience (Leveling up) */
.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 11px;
    width: 2px;
    background: linear-gradient(to bottom, var(--level-master), var(--level-2), var(--level-1));
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -3rem;
    top: 0;
    transform: translateX(-50%);
    background: var(--bg-dark);
    border: 2px solid;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 800;
    z-index: 2;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.level-master {
    border-color: var(--level-master);
    color: var(--level-master);
    text-shadow: 0 0 10px var(--level-master);
}

.level-advanced {
    border-color: var(--level-2);
    color: var(--level-2);
    text-shadow: 0 0 10px var(--level-2);
}

.level-base {
    border-color: var(--level-1);
    color: var(--level-1);
    text-shadow: 0 0 10px var(--level-1);
}

.timeline-content {
    padding: 2rem;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.timeline-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.time-badge {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.sm-pill {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.timeline-body p {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: var(--text-dim);
}

.timeline-body strong {
    color: var(--text-main);
}

.achievement {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-left: 3px solid var(--accent-color);
    border-radius: 0 8px 8px 0;
    margin-top: 1rem !important;
}

.achievement i {
    color: #f59e0b;
}

.github-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s;
}

.github-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Education (Cultivation) */
.education-card {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.edu-top {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.edu-icon {
    font-size: 2.5rem;
    color: var(--text-dim);
}

.edu-titles h3 {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}

.edu-titles h4 {
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.95rem;
}

.edu-details {
    display: flex;
    gap: 3rem;
}

.edu-col {
    flex: 1;
}

.edu-col h5 {
    color: #e2e8f0;
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.edu-col h5 i {
    color: var(--text-dim);
}

.custom-list {
    list-style: none;
}

.custom-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
    color: var(--text-dim);
    font-size: 0.95rem;
}

.custom-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Footer */
.glass-footer {
    border-top: 1px solid var(--glass-border);
    background: rgba(10, 10, 12, 0.4);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-title {
    font-size: 1.4rem;
    color: #e2e8f0;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: -0.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--accent-color);
}

.contact-methods {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.contact-btn i {
    color: var(--text-dim);
}

.copyright {
    color: rgba(161, 161, 170, 0.4);
    font-size: 0.8rem;
}

/* Animations & Utility */
.pulse {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* simple mobile fallback, ideally a hamburger menu */
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .edu-details {
        flex-direction: column;
        gap: 1.5rem;
    }

    .timeline {
        padding-left: 2rem;
    }

    .timeline::before {
        left: 0px;
    }

    .timeline-marker {
        left: 0;
        transform: translate(-50%, -10px);
    }

    .greeting {
        font-size: 1.8rem;
        padding: 0 1rem;
    }
}
