/* ===== CSS Variables ===== */
:root {
    /* Dark theme colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a24;

    /* Accent colors */
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);

    /* Text colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* UI elements */
    --border-color: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-hover: rgba(255, 255, 255, 0.06);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --glow: 0 0 40px rgba(99, 102, 241, 0.3);

    /* Spacing */
    --section-padding: 120px 0;
    --container-padding: 0 24px;

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Fira Code', monospace;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

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

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

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

/* ===== Background Animation ===== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.1) 100%);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.2) 0%, rgba(168, 85, 247, 0.1) 100%);
    bottom: -150px;
    left: -150px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.2) 0%, rgba(99, 102, 241, 0.1) 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(-30px, -20px) scale(1.02);
    }
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: var(--transition-fast);
}

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

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

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

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 24px 80px;
    position: relative;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-greeting {
    font-size: 1.1rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    font-weight: 400;
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 1.5em;
    background: var(--accent-primary);
    margin-left: 8px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 40px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-md), 0 0 30px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 50px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--card-hover);
    border-color: var(--accent-primary);
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.1rem;
}

/* ===== Code Window ===== */
.hero-visual {
    display: flex;
    justify-content: center;
}

.code-window {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.8s ease 0.3s backwards;
}

.window-header {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca40; }

.code-content {
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-content code {
    color: var(--text-secondary);
}

.keyword { color: #c792ea; }
.variable { color: #82aaff; }
.property { color: #f78c6c; }
.string { color: #c3e88d; }
.boolean { color: #ff9cac; }

/* ===== Scroll Indicator ===== */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    animation: fadeIn 1s ease 1s backwards;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 13px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s ease infinite;
}

@keyframes scroll {
    0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.3; transform: translateX(-50%) translateY(10px); }
}

/* ===== Section Styles ===== */
section {
    padding: var(--section-padding);
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 60px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.title-number {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent-primary);
    font-weight: 400;
}

/* ===== About Section ===== */
.about {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 80px;
    align-items: start;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.8;
}

.about-text strong {
    color: var(--text-primary);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.stat-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    transition: var(--transition-normal);
}

.stat-item:hover {
    background: var(--card-hover);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
}

.stat-icon {
    font-size: 1.8rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 12px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== Skills Section ===== */
.skills {
    background: var(--bg-secondary);
}

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

.skill-category {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    transition: var(--transition-normal);
}

.skill-category:hover {
    background: var(--card-hover);
    border-color: rgba(99, 102, 241, 0.3);
}

.skill-category h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.skill-category h3 i {
    color: var(--accent-primary);
}

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

.skill-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: var(--transition-fast);
}

.skill-tag:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-primary);
}

/* ===== Contact Section ===== */
.contact {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

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

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 1.3rem;
    transition: var(--transition-normal);
}

.social-link:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.3);
}

/* ===== Footer ===== */
.footer {
    padding: 40px 24px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        order: 1;
    }

    .hero-visual {
        order: 2;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

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

    .about-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .about-stats {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-link {
        display: block;
        padding: 16px 0;
    }

    .nav-toggle {
        display: flex;
    }

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

    .code-window {
        max-width: 100%;
    }

    .code-content {
        font-size: 0.8rem;
        padding: 16px;
    }

    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 16px 60px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

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

    .social-links {
        flex-wrap: wrap;
    }
}

/* ===== Stats Section ===== */
.stats-section {
    background: var(--bg-secondary);
}

.live-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.live-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    transition: var(--transition-normal);
}

.live-stat-card:hover {
    background: var(--card-hover);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
}

.live-stat-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    font-size: 1.8rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.live-stat-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.live-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.live-stat-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.live-stat-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: var(--transition-fast);
}

.live-stat-link:hover .live-stat-value {
    color: var(--accent-primary);
}

.live-stat-link .live-stat-label i {
    font-size: 0.75rem;
    margin-left: 6px;
    opacity: 0.7;
}

/* ===== Resume Section ===== */
.resume {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.resume-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
}

.resume-heading {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.resume-heading i {
    color: var(--accent-primary);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

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

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

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

.timeline-marker {
    position: absolute;
    left: -34px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.timeline-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: var(--transition-normal);
}

.timeline-content:hover {
    background: var(--card-hover);
    border-color: rgba(99, 102, 241, 0.2);
}

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

.timeline-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

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

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

/* ===== Responsive Updates for New Sections ===== */
@media (max-width: 1024px) {
    .live-stats-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .resume-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

@media (max-width: 768px) {
    .live-stat-card {
        padding: 28px 24px;
    }

    .live-stat-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }

    .live-stat-value {
        font-size: 1.5rem;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline-marker {
        left: -28px;
    }
}

/* ===== Timeline List ===== */
.timeline-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-list li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

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

.timeline-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-size: 0.8rem;
}
