/* ---------------
   CSS Variables
   --------------- */
:root {
    --bg-main: #0a0a0f;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --accent-primary: #8b5cf6;
    --accent-secondary: #06b6d4;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --nav-bg: rgba(10, 10, 15, 0.8);
    --gradient-text: linear-gradient(135deg, #8b5cf6, #06b6d4);
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

::selection {
    background-color: rgba(139, 92, 246, 0.3);
    color: #fff;
}

/* Background Gradients */
.bg-gradient-1, .bg-gradient-2 {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
}

.bg-gradient-1 {
    top: -10%;
    left: -10%;
    width: 40vw;
    height: 40vw;
    background: rgba(139, 92, 246, 0.15);
}

.bg-gradient-2 {
    bottom: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: rgba(6, 182, 212, 0.1);
}

/* Custom Cursor Glow */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: -1;
    transition: width 0.3s, height 0.3s;
}

/* ---------------
   Navigation
   --------------- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    z-index: 1000;
    transition: var(--transition-medium);
}

nav.scrolled {
    padding: 1rem 5%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent-primary);
}

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

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding-bottom: 5px;
    transition: var(--transition-fast);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-text);
    transition: var(--transition-medium);
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ---------------
   Reusable Classes
   --------------- */
.section {
    padding: 8rem 5% 4rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.section-title span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-primary);
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    transition: var(--transition-medium);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-text);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: #fff;
    transform: translateY(-2px);
}

/* ---------------
   Hero Section
   --------------- */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
}

.greeting {
    font-size: 1.2rem;
    color: var(--accent-secondary);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.name {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.role {
    font-size: 2rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.cursor {
    animation: blink 1s infinite;
}

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

.summary {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.contact-info span {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-info i {
    color: var(--accent-primary);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: var(--transition-fast);
}

.social-links a:hover {
    color: var(--accent-secondary);
    transform: translateY(-3px);
}

/* Graphic for Hero */
.hero-graphic {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sphere-container {
    position: relative;
    width: 300px;
    height: 300px;
}

.sphere {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at 30% 30%, #a482fe, #5b3ac8);
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.5);
    z-index: 2;
}

.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

.orbit-1 { width: 220px; height: 220px; animation-duration: 25s; }
.orbit-2 { width: 320px; height: 320px; animation-duration: 35s; animation-direction: reverse; }

@keyframes rotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.icon-floater {
    position: absolute;
    width: 44px;
    height: 44px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    z-index: 3;
    transform: translate(-50%, -50%);
    transition: var(--transition-medium);
}

.icon-floater:hover {
    transform: translate(-50%, -50%) scale(1.2);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
    z-index: 10;
}

.icon-1 { top: 50%; left: calc(50% + 110px); }
.icon-2 { top: calc(50% + 95px); left: calc(50% + 55px); }
.icon-3 { top: calc(50% + 95px); left: calc(50% - 55px); }
.icon-4 { top: 50%; left: calc(50% - 110px); }
.icon-5 { top: calc(50% - 95px); left: calc(50% - 55px); }
.icon-6 { top: calc(50% - 95px); left: calc(50% + 55px); }
.icon-7 { top: calc(50% + 80px); left: calc(50% + 138px); }
.icon-8 { top: calc(50% + 160px); left: 50%; }
.icon-9 { top: calc(50% + 80px); left: calc(50% - 138px); }
.icon-10 { top: calc(50% - 80px); left: calc(50% - 138px); }
.icon-11 { top: calc(50% - 160px); left: 50%; }
.icon-12 { top: calc(50% - 80px); left: calc(50% + 138px); }

/* ---------------
   Timeline (Experience & Education)
   --------------- */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--card-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

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

.timeline-dot {
    position: absolute;
    left: -2.4rem;
    top: 1.5rem;
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    border: 4px solid var(--bg-main);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.timeline-content h3 {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 0.3rem;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--accent-secondary);
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.timeline-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-secondary);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

/* ---------------
   Projects
   --------------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #fff;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.project-tags span {
    font-size: 0.8rem;
    padding: 0.2rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: var(--text-primary);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.project-link:hover {
    color: #fff;
    gap: 0.8rem;
}

/* ---------------
   Skills
   --------------- */
.skills-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.sub-section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.sub-section-title i {
    color: var(--accent-primary);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag, .lang-tag {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 30px;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.skill-tag:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    color: #fff;
    transform: translateY(-2px);
}

.lang-tag:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.3);
    color: #fff;
    transform: translateY(-2px);
}

/* ---------------
   Footer
   --------------- */
footer {
    padding: 4rem 5% 2rem;
    background: var(--card-bg);
    border-top: 1px solid var(--card-border);
    text-align: center;
}

.footer-content h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.footer-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.footer-content .social-links {
    justify-content: center;
    margin-bottom: 2rem;
}

.copyright {
    font-size: 0.9rem;
    color: #64748b !important;
}

/* ---------------
   Animations (Scroll Reveal)
   --------------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.slide-in {
    opacity: 0;
    transform: translateX(-30px);
    animation: slideIn 0.8s forwards;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s forwards;
    animation-delay: 0.3s;
}

@keyframes slideIn {
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* ---------------
   Media Queries
   --------------- */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding-top: 12rem;
    }
    
    .contact-info {
        align-items: center;
    }

    .hero-actions, .social-links {
        justify-content: center;
    }

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

@media (max-width: 768px) {
    .name { font-size: 3rem; }
    .role { font-size: 1.5rem; }
    
    .hamburger { display: block; z-index: 1001; }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition-medium);
    }

    .nav-links.nav-active {
        right: 0;
    }

    .timeline-meta {
        flex-direction: column;
        gap: 0.3rem;
    }
}
