/* ===========================
   ROOT & RESET
=========================== */
:root {
    --bg: #060b14;
    --bg-2: #0d1526;
    --surface: rgba(255,255,255,0.04);
    --surface-hover: rgba(255,255,255,0.07);
    --border: rgba(255,255,255,0.07);
    --border-hover: rgba(139,92,246,0.5);

    --text-1: #f1f5f9;
    --text-2: #94a3b8;
    --text-3: #64748b;

    --blue: #3b82f6;
    --indigo: #6366f1;
    --purple: #8b5cf6;
    --pink: #ec4899;
    --amber: #fbbf24;
    --green: #10b981;

    --gradient: linear-gradient(135deg, var(--blue), var(--purple));
    --glow: 0 0 40px rgba(99,102,241,0.25);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-1);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===========================
   BACKGROUND
=========================== */
.bg-mesh {
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(99,102,241,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 90%, rgba(59,130,246,0.1) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 50% 50%, rgba(139,92,246,0.05) 0%, transparent 70%);
    z-index: -2;
    pointer-events: none;
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
    animation: floatOrb 10s ease-in-out infinite alternate;
}
.orb-1 { width:500px; height:500px; top:-200px; left:-150px; background:radial-gradient(circle, rgba(99,102,241,0.15), transparent 70%); animation-delay:0s; }
.orb-2 { width:400px; height:400px; bottom:-150px; right:-100px; background:radial-gradient(circle, rgba(59,130,246,0.12), transparent 70%); animation-delay:-4s; }
.orb-3 { width:300px; height:300px; top:50%; left:60%; background:radial-gradient(circle, rgba(139,92,246,0.1), transparent 70%); animation-delay:-7s; }

@keyframes floatOrb {
    from { transform: translate(0,0) scale(1); }
    to   { transform: translate(30px,20px) scale(1.05); }
}

/* ===========================
   NAVBAR
=========================== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 5%;
    background: rgba(6,11,20,0.6);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(6,11,20,0.9);
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: 1px;
}

.logo-bracket {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-link {
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-1);
    background: var(--surface-hover);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-1);
    border-radius: 4px;
    transition: all 0.3s;
}

/* ===========================
   HERO
=========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8rem 10% 4rem;
    gap: 4rem;
}

.hero-content { max-width: 600px; }

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3);
    color: var(--green);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: pulseGlow 2.5s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.2); }
    50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}

.hero-content h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.2rem;
    color: var(--text-1);
}

.name-accent {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typewriter-wrap {
    font-size: 1.2rem;
    color: var(--text-2);
    margin-bottom: 1.5rem;
    min-height: 2rem;
}

.typewriter { color: var(--indigo); font-weight: 600; }
.cursor-blink { animation: blink 1s step-end infinite; color: var(--purple); }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-2);
    line-height: 1.8;
    margin-bottom: 1.8rem;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    padding: 0.45rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
}

.badge:hover {
    border-color: var(--border-hover);
    color: var(--text-1);
}

.cta-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99,102,241,0.5);
}

.btn-ghost {
    background: var(--surface);
    color: var(--text-1);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

/* Avatar / Hero Visual */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 320px;
    height: 320px;
}

.avatar-ring {
    position: relative;
    width: 200px;
    height: 200px;
}

.avatar-inner {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e1b4b, #1e3a5f);
    border: 3px solid rgba(139, 92, 246, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 35px rgba(99, 102, 241, 0.35), inset 0 0 20px rgba(99, 102, 241, 0.2);
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.avatar-inner:hover {
    box-shadow: 0 0 50px rgba(99, 102, 241, 0.6), inset 0 0 25px rgba(99, 102, 241, 0.3);
    border-color: rgba(168, 85, 247, 0.8);
    transform: scale(1.04);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    border-radius: 50%;
    display: block;
}

.avatar-fallback {
    display: none;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* CodeChef card extras */
.cc-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.cc-stars {
    color: #fbbf24;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.ring-orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(255,255,255,0.1);
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
}

.orbit-1 { width: 270px; height: 270px; animation: spin 10s linear infinite; }
.orbit-2 { width: 340px; height: 340px; animation: spin 15s linear infinite reverse; }

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

.orbit-dot {
    width: 10px; height: 10px;
    background: var(--indigo);
    border-radius: 50%;
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 10px var(--indigo);
}

.dot-2 { background: var(--purple); box-shadow: 0 0 10px var(--purple); }

.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(15px);
    padding: 0.6rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-1);
    white-space: nowrap;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.card-1 { top: 5%; right: 0; animation: floatCard 4s ease-in-out infinite; }
.card-2 { bottom: 20%; left: 0; animation: floatCard 4s ease-in-out infinite 1.5s; }
.card-3 { bottom: 5%; right: 5%; animation: floatCard 4s ease-in-out infinite 3s; }

@keyframes floatCard {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

/* ===========================
   SECTIONS
=========================== */
.section {
    padding: 6rem 10%;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    color: var(--indigo);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    font-family: 'Space Grotesk', monospace;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--text-1);
}

.section-sub {
    margin-top: 0.8rem;
    color: var(--text-2);
    font-size: 1rem;
}

/* Glass Card Base */
.glass-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(99,102,241,0.3);
    box-shadow: 0 8px 40px rgba(99,102,241,0.1);
    transform: translateY(-3px);
}

/* ===========================
   ABOUT
=========================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.about-text p { color: var(--text-2); font-size: 1.05rem; line-height: 1.9; }
.about-text strong { color: var(--text-1); font-weight: 600; }

.stats-row {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.stat-box {
    flex: 1;
    text-align: center;
    padding: 1rem;
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: 14px;
}

.stat-num {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-3);
    font-weight: 500;
    margin-top: 0.2rem;
}

/* Code block */
.code-block { padding: 0; overflow: hidden; }

.code-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.8rem 1.2rem;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.red    { background: #ff5f57; }
.yellow { background: #febc2e; }
.green  { background: #28c840; }

.code-lang {
    margin-left: auto;
    font-size: 0.78rem;
    color: var(--text-3);
    font-family: monospace;
    letter-spacing: 1px;
}

.code-body {
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.88rem;
    line-height: 1.8;
    color: var(--text-1);
    overflow-x: auto;
    white-space: pre;
}

.c-blue   { color: #60a5fa; }
.c-green  { color: #86efac; }
.c-purple { color: #c084fc; }
.c-yellow { color: #fde68a; }
.c-orange { color: #fb923c; }
.c-grey   { color: var(--text-3); font-style: italic; }

/* ===========================
   SKILLS
=========================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.skill-card { text-align: center; }

.skill-icon {
    width: 60px; height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin: 0 auto 1.2rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.skill-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-1);
}

.skill-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }

.tag {
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.2);
    color: #a5b4fc;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.25s;
}

.tag:hover {
    background: rgba(99,102,241,0.2);
    border-color: rgba(99,102,241,0.5);
    color: #c7d2fe;
}

/* ===========================
   CONTACT — NEW DESIGN
=========================== */
.contact-section { background: radial-gradient(ellipse 60% 50% at 50% 100%, rgba(99,102,241,0.07) 0%, transparent 70%); }

.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    max-width: 720px;
    margin: 0 auto;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    text-decoration: none;
    color: var(--text-1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--c1, #6366f1), var(--c2, #4f46e5));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.contact-card:hover::before { opacity: 0.06; }

.contact-card:hover {
    border-color: var(--c1, rgba(99,102,241,0.5));
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.contact-icon-wrap {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    position: relative;
    z-index: 1;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    position: relative;
    z-index: 1;
}

.contact-type {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-3);
}

.contact-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-1);
}

.contact-arrow {
    color: var(--text-3);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.contact-card:hover .contact-arrow {
    color: var(--text-1);
    transform: translate(2px,-2px);
}

/* ===========================
   FOOTER
=========================== */
.footer {
    text-align: center;
    padding: 2.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-3);
    font-size: 0.9rem;
}

.footer-name {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}

.footer-sub { margin-top: 0.3rem; font-size: 0.8rem; }

/* ===========================
   REVEAL ANIMATIONS
=========================== */
.reveal, .reveal-right {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right { transform: translateX(40px); }

.reveal.visible, .reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* ===========================
   RESPONSIVE
=========================== */

/* Tablet */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        padding-top: 7rem;
        text-align: center;
        gap: 3rem;
    }
    .hero-badges { justify-content: center; }
    .cta-buttons { justify-content: center; }
    .hero-visual { min-width: unset; }
    .about-grid { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 600px) {
    /* Nav */
    .hamburger {
        display: flex;
        z-index: 200;
        position: relative;
    }

    /* Hamburger → X animation */
    .hamburger.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    .hamburger span {
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    /* Nav dropdown */
    .nav-links {
        display: flex !important; /* override any inline style */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(6, 11, 20, 0.97);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.3s ease;
        gap: 0;
    }

    .nav-links.mobile-open {
        max-height: 300px;
        padding: 1rem 0;
    }

    .nav-link {
        padding: 0.9rem 2rem;
        font-size: 1rem;
        border-radius: 0;
        border-bottom: 1px solid var(--border);
        display: block;
        width: 100%;
    }

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

    /* Make navbar relative so dropdown anchors to it */
    .navbar { position: fixed; }

    /* Hero */
    .hero {
        padding: 6.5rem 5% 3rem;
        gap: 2rem;
    }

    .hero-content {
        order: 2;
    }

    .hero-content h1 { font-size: 2.1rem; }
    .hero-desc { font-size: 0.95rem; }

    .hero-visual {
        display: flex;
        order: 1;
        width: 100%;
        min-width: unset;
        height: auto;
        min-height: 230px;
        justify-content: center;
        align-items: center;
        margin-bottom: 0.5rem;
    }

    .avatar-ring {
        width: 170px;
        height: 170px;
    }

    .avatar-inner {
        width: 170px;
        height: 170px;
    }

    .orbit-1 { width: 220px; height: 220px; }
    .orbit-2 { width: 260px; height: 260px; }

    .floating-card {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }

    .card-1 { top: -8px; right: -12px; }
    .card-2 { bottom: 4px; left: -18px; }
    .card-3 { display: none; }

    /* About */
    .section { padding: 3.5rem 5%; }
    .section-title { font-size: 1.8rem; }
    .stats-row { flex-direction: row; gap: 0.6rem; }
    .stat-box { padding: 0.7rem 0.5rem; }
    .stat-num { font-size: 1.2rem; }
    .code-body { font-size: 0.78rem; }

    /* Skills */
    .skills-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .skill-card { padding: 1.5rem 1rem; }

    /* Contact */
    .contact-card {
        padding: 1.2rem;
        gap: 1rem;
    }
    .contact-value { font-size: 0.9rem; }
    .contact-icon-wrap { width: 44px; height: 44px; font-size: 1.1rem; }
}

@media (max-width: 380px) {
    .skills-grid { grid-template-columns: 1fr; }
    .hero-badges { flex-direction: column; align-items: center; }
}

