/* ═══════════════════════════════════════════════
   UPENDRA DEV PLATFORM — Navigation
   ═══════════════════════════════════════════════ */

/* ─── Top Navigation ─── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    background: rgba(13, 27, 42, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition-slow);
}

[data-theme="light"] .nav {
    background: rgba(244, 246, 251, 0.85);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-subtle);
    text-decoration: none;
    transition: color var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--grad-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Theme toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--surface-2);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 1.1rem;
    color: var(--text);
}

.theme-toggle:hover {
    background: var(--surface-3);
    border-color: var(--border-accent);
    transform: rotate(20deg);
}

/* Mobile menu toggle */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    z-index: 1001;
    /* Above mobile menu overlay */
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: var(--radius-full);
    transition: all 0.3s var(--ease);
    margin: 0 auto;
}

.nav-hamburger.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile nav */
@media (max-width: 768px) {
    .nav-hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        width: 100%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: rgba(13, 27, 42, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: var(--space-2xl);
        gap: var(--space-2xl);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        border: none;
    }

    [data-theme="light"] .nav-links {
        background: rgba(244, 246, 251, 0.98);
    }

    .nav-links.open {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.5rem;
        font-weight: 600;
    }
}

/* ─── Hero Section ─── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    overflow: hidden;
    background: var(--grad-hero);
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
}

.hero-orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(0, 212, 255, 0.08);
    top: -100px;
    right: -100px;
}

.hero-orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(124, 58, 237, 0.1);
    bottom: 0;
    left: -80px;
    animation-delay: -4s;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-4xl) var(--space-xl);
}

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

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--space-lg);
}

.hero-eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s ease-in-out infinite;
}

.hero-name {
    font-size: clamp(2.2rem, 4.5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, var(--text) 0%, var(--text-subtle) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-typewriter {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 500;
    color: var(--accent);
    font-family: var(--font-mono);
    min-height: 2em;
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    gap: 2px;
}

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--accent);
    animation: blink 0.8s step-end infinite;
    border-radius: 1px;
    flex-shrink: 0;
}

.hero-bio {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-subtle);
    margin-bottom: var(--space-xl);
    max-width: 500px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
}

.hero-social {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-subtle);
    font-size: 1rem;
    transition: all var(--transition);
    text-decoration: none;
}

.social-link:hover {
    background: rgba(var(--accent-rgb), 0.1);
    border-color: rgba(var(--accent-rgb), 0.3);
    color: var(--accent);
    transform: translateY(-2px);
}

/* Hero avatar side */
.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-ring-wrap {
    position: relative;
    display: inline-block;
}

.avatar-ring {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: conic-gradient(var(--accent), var(--accent2), var(--accent));
    animation: spin 8s linear infinite;
    z-index: 0;
}

.avatar-ring-mask {
    position: absolute;
    inset: -9px;
    border-radius: 50%;
    background: var(--bg);
    z-index: 1;
}

.avatar-img {
    position: relative;
    z-index: 2;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--surface-2);
}

.hero-stats {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-xl);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-md) var(--space-xl);
    box-shadow: var(--shadow-lg);
    white-space: nowrap;
}

.stat-item {
    text-align: center;
}

.stat-item .stat-num {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

.stat-item .stat-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ─── Tools Section ─── */
.tool-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--grad-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card:hover {
    color: var(--text);
}

.tool-card-icon {
    font-size: 2.5rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.3));
}

.tool-card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.tool-card-desc {
    font-size: 0.9rem;
    color: var(--text-subtle);
    line-height: 1.6;
    flex: 1;
}

.tool-card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: auto;
}

.tool-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-sm);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}

.tool-card-arrow {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    transition: gap var(--transition);
}

.tool-card:hover .tool-card-arrow {
    gap: var(--space-sm);
}

/* ─── Skills Section ─── */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.skill-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--surface-2);
    color: var(--text-subtle);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.skill-chip:hover {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent);
    border-color: rgba(var(--accent-rgb), 0.3);
    transform: translateY(-2px);
}

/* ─── Experience Timeline ─── */
.timeline {
    position: relative;
    padding-left: var(--space-2xl);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), var(--accent2), transparent);
    border-radius: var(--radius-full);
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-2xl);
}

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

.timeline-dot {
    position: absolute;
    left: calc(-1 * var(--space-2xl) - 5px);
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.2);
    transition: box-shadow var(--transition);
}

.timeline-item:hover .timeline-dot {
    box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0.3);
}

.timeline-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-sm);
}

.timeline-role {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.timeline-company {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
    font-family: var(--font-mono);
}

.timeline-desc {
    font-size: 0.9rem;
    color: var(--text-subtle);
    line-height: 1.7;
    margin-top: var(--space-sm);
}

/* ─── Cert / Award Cards ─── */
.cert-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.cert-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
    line-height: 1;
}

.cert-body {
    flex: 1;
}

.cert-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 2px;
}

.cert-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ─── Publication Cards ─── */
.pub-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition);
    color: var(--text);
}

.pub-card:hover {
    border-color: var(--border-accent);
    background: var(--surface-3);
    transform: translateX(4px);
    color: var(--text);
}

.pub-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.pub-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.pub-arrow {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 1rem;
    transition: color var(--transition), transform var(--transition);
}

.pub-card:hover .pub-arrow {
    color: var(--accent);
    transform: translateX(4px);
}

/* ─── Contact Section ─── */
.contact-card {
    text-align: center;
    padding: var(--space-3xl);
    background: var(--grad-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.04) 0%, transparent 60%);
    pointer-events: none;
}

/* ─── Footer ─── */
.footer {
    border-top: 1px solid var(--border);
    padding: var(--space-xl) 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer a {
    color: var(--text-muted);
    transition: color var(--transition);
}

.footer a:hover {
    color: var(--accent);
}

/* ─── Animations ─── */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.03);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.85);
    }
}

/* ─── Hero Responsive ─── */
@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        padding: var(--space-3xl) var(--space-xl);
    }

    .hero-visual {
        order: -1;
    }

    .hero-content {
        max-width: 100%;
    }

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

    .hero-bio {
        margin: 0 auto var(--space-xl);
    }

    .avatar-img {
        width: 200px;
        height: 200px;
    }

    .hero-stats {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: var(--space-xl);
        justify-content: center;
    }
}