:root{
    --bg:#050505;
    --bg2:#0b0b0b;
    --card:#111111;
    --purple:rgb(55,3,146);
    --purple-light:#7c4dff;
    --text:#ffffff;
    --text2:#a0a0a0;
    --border:rgba(55,3,146,.35);
}

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

html{
    scroll-behavior:smooth;
}

body{
    background:var(--bg);
    color:var(--text);
    font-family:'Inter',sans-serif;
    overflow-x:hidden;
    position:relative;
}

/* Animated Background */

body::before{
    content:"";
    position:fixed;
    inset:0;
    background:
    radial-gradient(circle at 20% 20%, rgba(55,3,146,.28), transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(55,3,146,.18), transparent 30%),
    linear-gradient(180deg,#050505,#090909,#050505);
    z-index:-2;
}

/* Moving Glow */

body::after{
    content:"";
    position:fixed;
    width:600px;
    height:600px;
    background:rgba(55,3,146,.08);
    filter:blur(140px);
    border-radius:50%;
    animation:floatGlow 18s infinite alternate ease-in-out;
    z-index:-1;
}

@keyframes floatGlow{
0%{ transform:translate(-150px,-100px); }
50%{ transform:translate(900px,300px); }
100%{ transform:translate(250px,700px); }
}

/* Navbar */

nav{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    padding:18px 8%;
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:rgba(5,5,5,.75);
    backdrop-filter:blur(15px);
    border-bottom:1px solid rgba(255,255,255,.05);
    z-index:999;
}

.nav-brand{
    display:flex;
    align-items:center;
    gap:14px;
}

nav h1{
    font-family:'Space Grotesk',sans-serif;
    font-size:26px;
    color:white;
}

nav ul{
    display:flex;
    list-style:none;
    gap:35px;
}

nav a{
    color:#cfcfcf;
    text-decoration:none;
    transition:.3s;
}

nav a:hover{
    color:var(--purple-light);
}

/* PFP Circle (nav) */

.pfp-circle{
    width:42px;
    height:42px;
    border-radius:50%;
    object-fit:cover;
    border:2px solid var(--border);
    box-shadow:0 0 18px rgba(55,3,146,.5);
}

.pfp-fallback{
    display:none;
    width:42px;
    height:42px;
    border-radius:50%;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,var(--purple),var(--purple-light));
    color:white;
    font-family:'Space Grotesk',sans-serif;
    font-weight:700;
    font-size:18px;
    border:2px solid var(--border);
    box-shadow:0 0 18px rgba(55,3,146,.5);
}

/* PFP Circle (hero, larger) */

.hero-name-row{
    display:flex;
    align-items:center;
    gap:24px;
    margin-bottom:10px;
}

.hero-name-row h2{
    margin-bottom:0;
}

.pfp-circle-lg{
    width:100px;
    height:100px;
    border-radius:50%;
    object-fit:cover;
    border:3px solid var(--border);
    box-shadow:0 0 40px rgba(55,3,146,.6);
    flex-shrink:0;
}

.pfp-fallback-lg{
    display:none;
    width:100px;
    height:100px;
    border-radius:50%;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,var(--purple),var(--purple-light));
    color:white;
    font-family:'Space Grotesk',sans-serif;
    font-weight:700;
    font-size:38px;
    border:3px solid var(--border);
    box-shadow:0 0 40px rgba(55,3,146,.6);
    flex-shrink:0;
}

/* Hero */

.hero{
    min-height:100vh;
    display:flex;
    align-items:center;
    padding:0 10%;
}

.hero-text{
    max-width:700px;
}

.small-text{
    color:var(--purple-light);
    letter-spacing:2px;
    margin-bottom:15px;
    text-transform:uppercase;
}

.hero h2{
    font-size:72px;
    font-family:'Space Grotesk',sans-serif;
    margin-bottom:10px;
}

.hero h3{
    font-size:34px;
    font-weight:500;
    color:#d8d8d8;
    margin-bottom:25px;
}

.hero-description{
    line-height:1.8;
    font-size:18px;
    color:var(--text2);
    margin-bottom:40px;
    max-width:600px;
}

.buttons{
    display:flex;
    gap:20px;
}

/* Buttons */

.primary-btn,
.secondary-btn{
    padding:14px 28px;
    border-radius:10px;
    text-decoration:none;
    transition:.35s;
    font-weight:600;
    display:inline-block;
    border:none;
    cursor:pointer;
    font-family:inherit;
    font-size:15px;
}

.primary-btn{
    background:var(--purple);
    color:white;
    box-shadow:0 0 30px rgba(55,3,146,.45);
}

.primary-btn:hover{
    transform:translateY(-4px);
    box-shadow:0 0 45px rgba(55,3,146,.8);
}

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

.secondary-btn:hover{
    background:rgba(55,3,146,.2);
    box-shadow:0 0 30px rgba(55,3,146,.4);
}

/* Sections */

section{
    padding:120px 10%;
}

section h2{
    font-size:42px;
    margin-bottom:40px;
    font-family:'Space Grotesk',sans-serif;
    position:relative;
    display:inline-block;
}

section h2::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-10px;
    height:3px;
    width:60%;
    background:var(--purple);
}

/* About */

#about p{
    max-width:800px;
    line-height:1.9;
    color:var(--text2);
    font-size:18px;
}

/* Stats */

.stats-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
    gap:40px;
    margin-top:60px;
    max-width:900px;
}

.stat-number{
    font-family:'Space Grotesk',sans-serif;
    font-weight:700;
    font-size:52px;
    color:var(--purple-light);
    text-shadow:0 0 25px rgba(124,77,255,.4);
    margin-bottom:8px;
}

.stat-label{
    color:var(--text2);
    font-size:16px;
}

@media(max-width:600px){
    .stat-number{ font-size:40px; }
}

/* Timeline */

.timeline{
    position:relative;
    margin-top:60px;
    padding-left:40px;
    border-left:2px solid rgba(55,3,146,.4);
}

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

.circle{
    position:absolute;
    left:-50px;
    top:10px;
    width:18px;
    height:18px;
    border-radius:50%;
    background:var(--purple);
    box-shadow:0 0 20px rgba(55,3,146,.8);
}

.card{
    background:var(--card);
    padding:28px;
    border-radius:18px;
    border:1px solid rgba(255,255,255,.05);
    transition:.35s;
}

.card:hover{
    transform:translateY(-8px);
    border-color:var(--purple);
    box-shadow:0 0 35px rgba(55,3,146,.35);
}

.card span{
    display:block;
    margin:12px 0;
    color:var(--purple-light);
}

.card p{
    color:var(--text2);
    line-height:1.8;
}

/* Skills */

.skills-group{
    margin-bottom:40px;
}

.skills-label{
    color:var(--text2);
    letter-spacing:2px;
    text-transform:uppercase;
    font-size:13px;
    margin-bottom:18px;
    display:block;
}

.skills-tags{
    display:flex;
    flex-wrap:wrap;
    gap:14px;
}

.skill-tag{
    padding:10px 20px;
    border-radius:30px;
    background:var(--card);
    border:1px solid rgba(255,255,255,.08);
    color:#e5e5e5;
    font-size:15px;
    transition:.3s;
}

.skill-tag:hover{
    border-color:var(--purple);
    color:white;
    box-shadow:0 0 20px rgba(55,3,146,.35);
    transform:translateY(-3px);
}

/* Projects */

.projects{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:30px;
    margin-top:50px;
}

.project-card{
    background:var(--card);
    padding:35px;
    border-radius:18px;
    border:1px solid rgba(255,255,255,.05);
    transition:.35s;
    display:flex;
    flex-direction:column;
}

.project-card:hover{
    transform:translateY(-10px);
    border-color:var(--purple);
    box-shadow:0 0 35px rgba(55,3,146,.4);
}

.project-card h3{
    margin-bottom:18px;
}

.project-card p{
    color:var(--text2);
    line-height:1.7;
    flex-grow:1;
    margin-bottom:20px;
}

.project-link{
    color:var(--purple-light);
    text-decoration:none;
    font-weight:600;
    font-size:15px;
    transition:.3s;
}

.project-link:hover{
    color:white;
}

.project-link.pending{
    color:#666;
    pointer-events:none;
}

/* Contact */

#contact{
    text-align:center;
}

#contact p{
    margin-bottom:40px;
    color:var(--text2);
}

.contact-cards{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:24px;
    margin-top:40px;
}

.contact-card{
    background:var(--card);
    border:1px solid rgba(255,255,255,.08);
    border-radius:16px;
    padding:26px 34px;
    text-align:left;
    min-width:230px;
    transition:.3s;
    cursor:pointer;
}

.contact-card:hover{
    border-color:var(--purple);
    box-shadow:0 0 30px rgba(55,3,146,.35);
    transform:translateY(-6px);
}

.contact-card-label{
    color:var(--text2);
    letter-spacing:2px;
    text-transform:uppercase;
    font-size:12px;
    margin-bottom:10px;
    display:block;
}

.contact-card-value{
    font-weight:700;
    font-size:18px;
    margin-bottom:8px;
}

.contact-card-action{
    color:var(--purple-light);
    font-size:14px;
    text-decoration:none;
    display:inline-block;
}

.contact-card-action:hover{
    color:white;
}

/* Footer */

footer{
    padding:35px;
    text-align:center;
    color:#666;
    border-top:1px solid rgba(255,255,255,.05);
}

/* Cursor Glow */

#cursor-glow{
    position:fixed;
    width:300px;
    height:300px;
    background:radial-gradient(circle, rgba(55,3,146,.25), transparent 70%);
    pointer-events:none;
    transform:translate(-50%,-50%);
    z-index:0;
}

/* Scroll Animation */

.card,
.project-card,
section h2,
#about p,
.skills-group,
.contact-cards,
.stats-grid{
    opacity:0;
    transform:translateY(40px);
    transition:all .8s ease;
}

.show{
    opacity:1 !important;
    transform:translateY(0) !important;
}

/* Mobile */

@media(max-width:900px){
    .hero h2{ font-size:54px; }
    .hero h3{ font-size:26px; }
    nav{ padding:16px 6%; }
    nav ul{ gap:18px; font-size:14px; }
    .buttons{ flex-direction:column; align-items:flex-start; }
    section{ padding:90px 8%; }
    .pfp-circle-lg, .pfp-fallback-lg{ width:70px; height:70px; font-size:26px; }
    .hero-name-row{ gap:16px; }
}

nav ul li a.active{
    color:#7c4dff;
}

nav ul li a.active::after{
    width:100%;
}

nav ul li a{
    position:relative;
}

nav ul li a::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-6px;
    width:0;
    height:2px;
    background:#7c4dff;
    transition:.3s;
}

nav ul li a:hover::after{
    width:100%;
}