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

:root {
    --bg: #0a0a0f;
    --bg-alt: #111119;
    --surface: #1a1a25;
    --border: #2a2a3a;
    --text: #e4e4ed;
    --text-muted: #8888a0;
    --accent: #6c63ff;
    --accent-glow: rgba(108, 99, 255, 0.25);
    --accent-2: #ff6b9d;
    --radius: 12px;
    --max-w: 1100px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

/* ── Navbar ── */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

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

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
}

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

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

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

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Hero ── */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: var(--max-w);
    z-index: 1;
}

.hero-greeting {
    font-size: 1.1rem;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.5rem;
}

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

.hero-title {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.highlight {
    color: var(--accent-2);
    font-weight: 600;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--accent-glow);
}

.btn-outline {
    border: 1.5px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.hero-visual {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    width: 340px;
    height: 340px;
    opacity: 0.15;
    pointer-events: none;
}

.orbit-ring {
    width: 100%;
    height: 100%;
    border: 1px solid var(--accent);
    border-radius: 50%;
    position: relative;
    animation: spin 20s linear infinite;
}

.orbit-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    animation: spin 20s linear infinite reverse;
    animation-delay: var(--delay);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Sections ── */

.section {
    padding: 5rem 2rem;
    max-width: var(--max-w);
    margin: 0 auto;
}

.section-alt {
    max-width: 100%;
    background: var(--bg-alt);
}

.section-alt > * {
    max-width: var(--max-w);
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
}

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

/* ── About ── */

.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

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

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

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

/* ── Timeline ── */

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

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

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

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

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-alt);
    border: 2px solid var(--accent);
    z-index: 1;
}

.timeline-item:first-child .timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

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

.timeline-date {
    font-size: 0.8rem;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

.badge {
    display: inline-block;
    font-size: 0.7rem;
    background: var(--accent-glow);
    color: var(--accent);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    vertical-align: middle;
    margin-left: 0.25rem;
}

.community-roles {
    margin-top: 3rem;
}

.subsection-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.role-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.chip {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Projects ── */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(108, 99, 255, 0.1);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-icon {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

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

.project-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
}

.project-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex: 1;
    margin-bottom: 1rem;
}

.project-lang {
    font-size: 0.8rem;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

/* ── Achievements ── */

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.achievement-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    text-align: center;
}

.achievement-rank {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    display: block;
    margin-bottom: 0.5rem;
}

.achievement-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.achievement-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ── Contact ── */

.contact-text {
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: all 0.25s;
}

.contact-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.contact-item:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* ── Footer ── */

.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ── Responsive ── */

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        align-items: center;
        padding: 1.5rem;
        gap: 1.25rem;
        border-bottom: 1px solid var(--border);
        transform: translateY(-120%);
        transition: transform 0.3s;
    }

    .nav-links.open {
        transform: translateY(0);
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 5rem 1.5rem 3rem;
    }

    .hero-visual {
        display: none;
    }

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

    .about-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .stat-card {
        flex: 1;
        min-width: 140px;
    }

    .projects-grid,
    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .contact-links {
        flex-direction: column;
    }
}
