/* Variables */
:root {
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #F4F4F5;
    --text-muted: #A1A1AA;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    --transition-normal: 2s cubic-bezier(.16,1,.3,1);
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 3px;
    height: 3px;
    border-radius: 20px;
    border: none;
}

::-webkit-scrollbar-track {
    background:#101010;
}

::-webkit-scrollbar-thumb {
    border-radius: 20px;
    border: 3px solid #bbb;

    background:var(--primary);
    border-radius:999px;
}

/* Background blur glow effect */
body::before{
    content:"";
    position:fixed;
    width:600px;
    height:600px;
    background:#8b5cf630;
    border-radius:50%;
    filter:blur(180px);
    top:-200px;
    left:-150px;
    z-index:-3;
}

body::after{
    content:"";
    position:fixed;
    width:500px;
    height:500px;
    background:#6d28d950;
    border-radius:50%;
    filter:blur(180px);
    bottom:-150px;
    right:-120px;
    z-index:-3;
}

body {
    background:var(--void);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-main);
}

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

ul {
    list-style: none;
}

/* Background effects */
.bg-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-size: 50px 50px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.section-padding {
    padding: 80px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Navigation */
.top-nav {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 998;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom:1px solid transparent;
    transition:background .4s ease, border-color .4s ease, backdrop-filter .4s ease;
}

.top-nav.scrolled{
    background:rgba(8,8,10,.6);
    backdrop-filter:blur(16px);
    border-bottom:1px solid var(--line);
}

.nav-container {
    width: 97%;
    margin: 0 auto;
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
    color: var(--text-muted);
}

.home-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--glass-glow);
}

.nav-title {
    letter-spacing: 2px;
    font-size: 1rem;
    font-family:"JetBrains Mono",monospace;
    color:var(--mist);
    display: block;
}

/* Menu bar (Hamburger menu) */
.menu-btn{
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
    color: var(--text-muted);
    cursor: pointer;
}

.menu-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--glass-glow);
}

.menu {
    font-size: 20px;
}

.mobile-menu{
    position:fixed;
    top:0;
    right:-100%;
    width:280px;
    height:100vh;
    background:rgba(10,10,15,.9);
    backdrop-filter:blur(20px);
    border-left:1px solid rgba(255,255,255,.1);
    display:flex;
    flex-direction:column;
    padding:100px 35px;
    gap:28px;
    transition:.4s ease;
    z-index:1000;
    color: #ffffff;
}

.mobile-menu.active{
    right:0;
}

.mobile-menu a{
    text-decoration:none;
    font-size:18px;
    transition:.3s;
}

.mobile-menu a:hover{
    color:var(--amethyst);
    transform:translateX(6px);
}

.active-page::after {
    color: var(--amethyst);
    content: " ‹";
}

.close-btn{
    position:absolute;
    top:25px;
    right:25px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
    color: var(--text-muted);
    cursor: pointer;
}

.close-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--glass-glow);
}

.close {
    font-size: 20px;
}

.overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    opacity:0;
    visibility:hidden;
    transition:.3s;
    z-index:999;
}

.overlay.active{
    opacity:1;
    visibility:visible;
}

/* Glass card */
.glass-card {
    background:rgba(13,13,19,.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border:1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: var(--transition-fast);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Timeline */
.timeline-section {
    padding: 20px 5%;
}

.timeline-wrap {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0px 0 40px 0;
}

.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--card-border);
    transform: translateX(-50%);
    border-radius: 2px;
    overflow: hidden;
}

.timeline-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    box-shadow: 0 0 15px var(--secondary);
    transition: height 0.1s ease-out;
}

.timeline-item {
    position: relative;
    width: 50%;
    margin-bottom: 60px;
}

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

.timeline-item.left {
    left: 0;
    padding-right: 50px;
}

.timeline-item.right {
    left: 50%;
    padding-left: 50px;
}

.timeline-node {
    position: absolute;
    top: 30px;
    width: 16px;
    height: 16px;
    background: var(--bg-color);
    border: 2px solid var(--card-border);
    border-radius: 50%;
    z-index: 2;
    transition: var(--transition-fast);
}

.timeline-item.left .timeline-node { right: -8px; }
.timeline-item.right .timeline-node { left: -8px; }

.timeline-node.active {
    border-color: var(--secondary);
    background: var(--primary);
    box-shadow: 0 0 15px var(--secondary), 0 0 30px var(--primary);
    transform: scale(1.2);
}

.timeline-card {
    --hover-glow:173, 73, 225;
    overflow:hidden;
}

/* Mouse follow spotlight */
.timeline-card::before{
    content:"";
    position:absolute;
    inset:0;
    z-index:0;
    opacity:0;
    background:radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(var(--hover-glow),.12), transparent 45%);
    transition:opacity .4s ease;
    pointer-events:none;
}

.timeline-card:hover::before{
    opacity:1;
}

/* Timeline card */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.company-logo {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    border: 1px solid var(--card-border);
}

.badge {
    background: rgba(122, 28, 172, 0.2);
    color: var(--secondary);
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(173, 73, 225, 0.3);
}

.role-title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.company-name {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.role-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1.5rem;
}

.dot-separator { color: var(--card-border); }

.role-desc {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.achievements ul {
    margin-bottom: 1.5rem;
}

.achievements li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #DDD;
    margin-bottom: 8px;
}

.achievements svg {
    width: 16px;
    height: 16px;
    stroke: var(--secondary);
    fill: none;
    stroke-width: 2;
}

/* Tech stack  */
.tech-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(122, 28, 172, 0.4);
    color: #E4E4E7;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.8rem;
    transition: var(--transition-fast);
    cursor: default;
}

.chip:hover {
    background: rgba(122, 28, 172, 0.15);
    border-color: var(--secondary);
    box-shadow: 0 0 12px rgba(173, 73, 225, 0.3);
    transform: scale(1.05);
}

/* CTA */
.cta-section { margin-bottom: 20px; }
.cta-card { 
    text-align: center; 
    overflow: hidden;
}

.cta-card::before{
    content:"";
    position:absolute;
    top:-40%;
    left:50%;
    width:500px;
    height:500px;
    transform:translateX(-50%);
    background:radial-gradient(circle, #8b5cf640, transparent 70%);
    z-index:0;
}

.cta-card h2 { font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: 1rem; }
.cta-card p { color: var(--text-muted); max-width: 500px; margin: 0 auto 2rem auto; }
.cta-buttons { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 500;
    font-family: var(--font-body);
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background:var(--amethyst);
    color: #ffffff;
    border: none;
}

.btn-primary:hover {
    transform:translateY(-4px);
    box-shadow:0 10px 30px #8b5cf666;
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--card-border);
}

.btn-outline:hover {
    border-color: var(--secondary);
    background: rgba(122, 28, 172, 0.1);
    box-shadow: 0 0 15px rgba(173, 73, 225, 0.2);
    transform: translateY(-3px);
}

/* Animations */
.animate-fade-up, .animate-slide-left, .animate-slide-right {
    opacity: 0;
    transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.animate-fade-up { transform: translateY(40px); }
.animate-slide-left { transform: translateX(40px); }
.animate-slide-right { transform: translateX(-40px); }

.animate-fade-up.visible, 
.animate-slide-left.visible, 
.animate-slide-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Slide down animation */
@keyframes slideDown {
    from{
        transform: translateY(-60px);
        opacity: 0;
    }
    to {
        transform: translateY(0px);
        opacity: 1;
    }
}

.slide-down{
    animation:slideDown 2s var(--ease) forwards;
}

/* Responsive */
@media (max-width: 992px) {
    .timeline-line { left: 24px; transform: none; }
    
    .timeline-item.left, .timeline-item.right {
        width: 100%;
        left: 0;
        padding-left: 70px;
        padding-right: 0;
    }
    
    .timeline-item.left .timeline-node, .timeline-item.right .timeline-node {
        left: 16px;
        right: auto;
    }

    .animate-slide-left, .animate-slide-right {
        transform: translateY(40px); 
    }
    .animate-slide-left.visible, .animate-slide-right.visible {
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .glass-card { padding: 1.5rem; }
    .role-meta { flex-direction: column; align-items: flex-start; gap: 4px; }
    .dot-separator { display: none; }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.6rem 0;
        width: 90%;
    }

    .home {font-size: 15px;}

    .cta-buttons { flex-direction: column; width: 100%; }
    .btn { width: 100%; }
    .timeline-item.left, .timeline-item.right { padding-left: 55px; }
    .timeline-line { left: 16px; }
    .timeline-item.left .timeline-node, .timeline-item.right .timeline-node { left: 8px; }
}

@media (max-width:375px){

    .nav-container {
        padding: 0.5rem 0;
        width: 95%;
    }

    .nav-title { font-size: 0.8rem; }

    .home-btn {
        width: 30px;
        height: 30px;
    }

    .home { font-size: 12px;}
}