/* =============================================
   PORTFOLIO — Shared Stylesheet
   Mangali Sai Krishna (MSK)
   ============================================= */

/* ---- Page Entry Animation ---- */
@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Base */
body {
    background-color: #f8fafc;
    color: #334155;
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    animation: pageEnter 0.55s cubic-bezier(0.4, 0, 0.2, 1) both;
    animation-delay: 0.05s;
}

h1, h2, h3, h4, h5, h6, .font-display {
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.02em;
}

/* ---- Ambient Orbs ---- */
.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
}
.orb-1 {
    top: -10%; left: -10%; width: 50vw; height: 50vw;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, rgba(255,255,255,0) 70%);
    animation: blob 15s infinite alternate;
}
.orb-2 {
    top: 40%; right: -20%; width: 60vw; height: 60vw;
    background: radial-gradient(circle, rgba(217,70,239,0.1) 0%, rgba(255,255,255,0) 70%);
    animation: blob 18s infinite alternate-reverse;
}
.orb-3 {
    bottom: -20%; left: 20%; width: 50vw; height: 50vw;
    background: radial-gradient(circle, rgba(6,182,212,0.15) 0%, rgba(255,255,255,0) 70%);
    animation: blob 20s infinite alternate;
}

/* ---- Glassmorphism ---- */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, border-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}
.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.15);
}

/* ---- Glow Border on Hover ---- */
.card-glow-hover { position: relative; }
.card-glow-hover::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 1.6rem;
    background: linear-gradient(45deg, #4f46e5, #9333ea, #ec4899, #06b6d4);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
    filter: blur(10px);
}
.glass-card.card-glow-hover:hover::before { opacity: 0.3; }

/* ---- Text Gradients ---- */
.text-gradient-primary {
    background: linear-gradient(135deg, #1e293b 0%, #4338ca 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}
.text-gradient-accent {
    background: linear-gradient(to right, #0284c7, #4f46e5, #9333ea, #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    background-size: 200% auto;
    animation: gradient-x 5s linear infinite;
}

/* ---- Buttons ---- */
.btn-premium {
    position: relative;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #4f46e5;
    border-radius: 9999px;
    padding: 0.8rem 2rem;
    font-weight: 600;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}
.btn-premium::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(45deg, #4f46e5, #ec4899);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.btn-premium:hover::before { opacity: 1; }
.btn-premium:hover {
    color: white;
    border-color: transparent;
    box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    position: relative;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #cbd5e1;
    color: #475569;
    border-radius: 9999px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}
.btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1),
                transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0.2s;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Profile Ring ---- */
.profile-ring {
    position: relative;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(45deg, #06b6d4, #3b82f6, #ec4899);
    animation: spin 10s linear infinite;
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.3);
}
.profile-ring > div {
    border-radius: 50%;
    background: #ffffff;
    padding: 6px;
    animation: spin 10s linear infinite reverse;
}

/* ---- Grid Overlay ---- */
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    z-index: -2;
    pointer-events: none;
}

/* ---- Page Hero Banner (for inner pages) ---- */
.page-hero {
    padding-top: 8rem;
    padding-bottom: 3rem;
    text-align: center;
}
.page-hero .page-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    border: 1px solid #e0e7ff;
    background: #eef2ff;
    font-size: 0.8rem;
    font-weight: 600;
    color: #4338ca;
    margin-bottom: 1rem;
}

/* ---- Sticky Navbar ---- */
.nav-pill {
    transition: background 0.4s ease, box-shadow 0.4s ease,
                border-color 0.4s ease, margin-top 0.35s ease,
                padding 0.35s ease;
}
.nav-pill.nav-scrolled {
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.14),
                0 2px 10px rgba(0, 0, 0, 0.06) !important;
    border-color: rgba(99, 102, 241, 0.25) !important;
    margin-top: 0.5rem !important;
    padding-top: 0.6rem !important;
    padding-bottom: 0.6rem !important;
}

/* ---- Section Divider ---- */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(99,102,241,0.25), transparent);
    margin: 0 2rem;
}

/* ---- Keyframes ---- */
@keyframes blob {
    0%   { transform: translate(0px, 0px) scale(1); }
    33%  { transform: translate(30px, -50px) scale(1.1); }
    66%  { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}
@keyframes gradient-x {
    0%, 100% { background-position: left center; }
    50%       { background-position: right center; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}
@keyframes spin {
    100% { transform: rotate(360deg); }
}
@keyframes pulse-slow {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}
