/* ==========================================
   Monochrome Portfolio Design System
   Color Palette: Pure Black, Crisp White, Zinc Grays
   ========================================== */

:root {
    --bg-main: #080808;
    --bg-card: #121212;
    --bg-card-hover: #1a1a1a;
    --bg-glass: rgba(18, 18, 18, 0.75);
    
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --accent-white: #ffffff;
    --accent-silver: #e4e4e7;
    --accent-glow: rgba(255, 255, 255, 0.15);
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.18);
    --border-strong: rgba(255, 255, 255, 0.4);
    
    --font-heading: 'Space Grotesk', -apple-system, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.65;
}

/* Custom Cursor */
.cursor {
    width: 8px;
    height: 8px;
    background: var(--accent-white);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.cursor-follower {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out, width 0.2s, height 0.2s, border-color 0.2s;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
    padding: 0.85rem 0;
    transition: padding 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

.navbar.scrolled {
    padding: 0.55rem 0;
    background: rgba(8, 8, 8, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}

.nav-content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.logo .highlight {
    color: var(--text-secondary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.8rem;
    list-style: none;
}

.nav-item {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 0.4rem 0.2rem;
}

.nav-item:hover,
.nav-item.active {
    color: var(--accent-white);
    font-weight: 600;
}

.nav-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--accent-white);
    transition: width 0.3s ease;
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

.resume-link {
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
    padding: 0.4rem 0.9rem !important;
    border-radius: var(--radius-sm);
}

.resume-link::after {
    display: none;
}

.resume-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-white);
}

.contact-btn {
    background: var(--accent-white);
    color: #080808 !important;
    font-weight: 600;
    padding: 0.5rem 1.2rem !important;
    border-radius: var(--radius-full);
}

.contact-btn::after {
    display: none;
}

.contact-btn:hover {
    background: var(--accent-silver);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.25);
}

.nav-social-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0.3rem;
}

.nav-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 1.05rem;
    transition: var(--transition);
}

.nav-social-icon:hover {
    color: var(--accent-white);
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-medium);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* Burger Mobile Menu */
.burger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
}

.burger .line {
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition);
}

/* Section Containers */
section {
    position: relative;
    z-index: 1;
    padding: 6rem 1.5rem;
    max-width: 1240px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3.5rem auto;
}

.section-subtitle {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn.primary {
    background: var(--accent-white);
    color: #080808;
}

.btn.primary:hover {
    background: var(--accent-silver);
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.25);
}

.btn.secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn.secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-white);
    transform: translateY(-2px);
}

.btn.outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
}

.btn.outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-white);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 7rem;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    margin-bottom: 1.5rem;
    width: fit-content;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px #22c55e;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.status-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.hero-title {
    font-size: 3.8rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-height: 2.2rem;
    margin-bottom: 1.2rem;
    font-family: var(--font-heading);
}

.cursorDot {
    display: inline-block;
    width: 3px;
    background-color: var(--accent-white);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero .description {
    font-size: 1.1rem;
    max-width: 540px;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-socials {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1.8rem;
    flex-wrap: wrap;
}

.hero-social-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-right: 0.2rem;
}

.hero-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.hero-social-link i {
    font-size: 1.05rem;
    color: var(--text-primary);
}

.hero-social-link:hover {
    color: var(--accent-white);
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-medium);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

/* ==========================================
   3D Cursor-Interactive Avatar Scene
   ========================================== */
.profile-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
}

.avatar-3d-scene {
    position: relative;
    width: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    perspective: 1200px;
    transform-style: preserve-3d;
}

.avatar-ambient-glow {
    position: absolute;
    top: 50px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 170, 110, 0.28) 0%, rgba(255, 255, 255, 0.12) 40%, rgba(0, 0, 0, 0) 70%);
    filter: blur(40px);
    pointer-events: none;
    transform: translateZ(-40px);
    transition: transform 0.2s ease-out, opacity 0.3s ease;
    opacity: 0.85;
}

.avatar-3d-card {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    transform-style: preserve-3d;
    cursor: grab;
    will-change: transform;
    user-select: none;
}

.avatar-3d-card:active {
    cursor: grabbing;
}

/* Holographic Tech Orbit Rings */
.avatar-tech-ring-outer {
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    pointer-events: none;
    animation: rotateTechRing 35s linear infinite;
    transform: translateZ(10px);
}

.avatar-tech-ring-inner {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-left-color: rgba(255, 255, 255, 0.6);
    border-right-color: rgba(255, 180, 120, 0.5);
    pointer-events: none;
    animation: rotateTechRingReverse 25s linear infinite;
    transform: translateZ(20px);
}

@keyframes rotateTechRing {
    from { transform: translateZ(10px) rotate(0deg); }
    to { transform: translateZ(10px) rotate(360deg); }
}

@keyframes rotateTechRingReverse {
    from { transform: translateZ(20px) rotate(360deg); }
    to { transform: translateZ(20px) rotate(0deg); }
}

/* Model Frame */
.avatar-model-frame {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    padding: 6px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 180, 130, 0.15) 50%, rgba(255, 255, 255, 0.05) 100%);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.85),
        0 0 30px rgba(255, 170, 110, 0.15),
        inset 0 0 20px rgba(255, 255, 255, 0.15);
    transform: translateZ(35px);
    transform-style: preserve-3d;
}

/* Avatar Images & Smooth Hover Reveal */
.avatar-img {
    position: absolute;
    inset: 6px;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    object-fit: cover;
    border-radius: 50%;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.5s ease;
    will-change: opacity, transform;
}

/* 3D Avatar (Default Visible) */
.avatar-img.avatar-3d {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
    z-index: 2;
}

/* Real Photo (Hidden by default, reveals on hover) */
.avatar-img.avatar-real {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.97);
    filter: contrast(105%) brightness(100%);
    z-index: 1;
}

/* On Hover over Avatar Card: Smoothly reveal real photo */
.avatar-3d-card:hover .avatar-img.avatar-3d,
.avatar-3d-card.show-real .avatar-img.avatar-3d {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.04);
}

.avatar-3d-card:hover .avatar-img.avatar-real,
.avatar-3d-card.show-real .avatar-img.avatar-real {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    z-index: 3;
}

/* Enhanced Ambient Glow & Frame highlights on hover */
.avatar-3d-scene:hover .avatar-ambient-glow {
    opacity: 1;
    filter: blur(35px);
    background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, rgba(255, 255, 255, 0.18) 40%, rgba(0, 0, 0, 0) 70%);
}

.avatar-3d-card:hover .avatar-model-frame {
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.95),
        0 0 35px rgba(56, 189, 248, 0.25),
        inset 0 0 25px rgba(255, 255, 255, 0.25);
}

/* Specular Light Reflection Sheen */
.avatar-specular-glare {
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: overlay;
    background: radial-gradient(
        circle 200px at var(--glare-x, 50%) var(--glare-y, 30%),
        rgba(255, 255, 255, 0.75) 0%,
        rgba(255, 255, 255, 0.25) 35%,
        rgba(255, 255, 255, 0) 70%
    );
    opacity: var(--glare-opacity, 0.55);
    transform: translateZ(45px);
    transition: opacity 0.25s ease;
    z-index: 4;
}

/* Floating 3D Depth Tags */
.avatar-floating-tag {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    background: rgba(14, 14, 18, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-heading);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(255, 255, 255, 0.05);
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    will-change: transform;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    z-index: 5;
}

.avatar-floating-tag.tag-top {
    top: -10px;
    right: -25px;
    transform: translateZ(65px);
    border-color: rgba(255, 200, 150, 0.35);
}

.avatar-floating-tag.tag-bottom {
    bottom: 12px;
    left: -35px;
    transform: translateZ(75px);
    border-color: rgba(255, 255, 255, 0.25);
}

.avatar-floating-tag.tag-status {
    top: 25px;
    left: -30px;
    transform: translateZ(50px);
    font-size: 0.74rem;
    padding: 5px 12px;
    gap: 8px;
}

.pulse-indicator {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 10px #22c55e;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}


.scroll-indicator {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--border-medium);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--accent-white);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% { opacity: 1; top: 6px; }
    100% { opacity: 0; top: 22px; }
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-medium);
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 255, 255, 0.05);
}

.project-image {
    position: relative;
    width: 100%;
    height: 210px;
    overflow: hidden;
    background: #000;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(40%) contrast(105%);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.project-card:hover .project-image img {
    filter: grayscale(0%);
    transform: scale(1.06);
}

.project-overlay {
    position: absolute;
    z-index: 2;
}

.project-overlay.top-right,
.project-overlay:not(.bottom-right) {
    top: 12px;
    right: 12px;
}

.project-overlay.bottom-right {
    bottom: 12px;
    right: 12px;
}

.status-pill {
    background: rgba(8, 8, 8, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.status-dot-amber {
    width: 6px;
    height: 6px;
    background-color: #f59e0b;
    border-radius: 50%;
    box-shadow: 0 0 6px #f59e0b;
    animation: pulse 2s infinite;
}

.status-dot-green {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 6px #10b981;
    animation: pulse 2s infinite;
}

.status-pill.live {
    border-color: rgba(16, 185, 129, 0.4);
}

.project-category {
    background: rgba(8, 8, 8, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-medium);
    color: var(--accent-white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
}

.project-content {
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.35;
    min-height: 3.4rem;
    display: flex;
    align-items: flex-start;
}

.project-content p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
    color: var(--text-secondary);
}

.repo-bar {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    margin-top: auto;
}

.repo-bar-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.repo-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.repo-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.38rem 0.8rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.repo-btn:hover {
    background: var(--accent-white);
    color: #080808;
    border-color: var(--accent-white);
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}

.repo-btn.live-btn {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.repo-btn.live-btn:hover {
    background: #10b981;
    color: #080808;
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.project-features-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1.4rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-sm);
}

.feature-item {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.feature-item i {
    color: var(--text-primary);
    font-size: 0.75rem;
    width: 14px;
    text-align: center;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.4rem;
}

.project-tech span {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.78rem;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-sm);

}

.project-links {
    display: flex;
    gap: 0.8rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-sm);
}

.project-link:hover {
    background: var(--accent-white);
    color: #080808;
}

/* Mini Projects Section & Carousel */
.mini-projects {
    padding-top: 3rem;
}

.carousel-container {
    position: relative;
    padding: 0 4.2rem;
    display: flex;
    align-items: center;
}

.carousel-wrapper {
    overflow: hidden;
    width: 100%;
    padding: 1rem 0;
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.carousel-button.prev {
    left: 0;
}

.carousel-button.next {
    right: 0;
}

.carousel-button:hover {
    background: var(--accent-white);
    color: #080808;
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.mini-project-card {
    min-width: 330px;
    max-width: 330px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.mini-project-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-medium);
    transform: translateY(-4px);
}

.mini-icon {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.mini-project-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.mini-project-content h3 {
    font-size: 1.15rem;
    line-height: 1.35;
    margin-bottom: 0.8rem;
    min-height: 3.1rem;
    display: flex;
    align-items: flex-start;
}

.mini-project-content p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    min-height: 4.4rem;
    flex-grow: 1;
}

.mini-project-content .project-tech {
    margin-top: auto;
    margin-bottom: 1.2rem;
    min-height: 2.2rem;
    display: flex;
    align-items: flex-end;
}

.mini-project-content .project-links {
    margin-top: auto;
    padding-top: 0.4rem;
}

/* Internships / Work History Section */
.internships {
    padding-top: 1rem;
}

.internship-card {
    min-width: 360px;
    max-width: 360px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.internship-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-medium);
    transform: translateY(-4px);
}

.company-badge {
    width: 60px;
    height: 60px;
    background: #ffffff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.company-badge img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.company-badge.text-badge {
    background: var(--accent-white);
    color: #080808;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    border: 1px solid var(--border-medium);
}

.internship-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    margin-top: 1rem;
}

.internship-duration {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.internship-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    min-height: 1.6rem;
    line-height: 1.3;
}

.company-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.85rem;
}

.internship-description {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1.6rem;
    min-height: 6.8rem;
    flex-grow: 1;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    min-height: 3.2rem;
    align-content: flex-end;
}

/* Skills Section */
.skills-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
}

.skill-filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.5rem 1.2rem;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.skill-filter-btn:hover,
.skill-filter-btn.active {
    background: var(--accent-white);
    color: #080808;
    border-color: var(--accent-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.bento-card:hover {
    border-color: var(--border-strong);
    background: var(--bg-card-hover);
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.06);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 1rem;
}

.cat-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent-white);
    flex-shrink: 0;
}

.cat-title-group {
    display: flex;
    flex-direction: column;
}

.cat-title-group h3 {
    font-size: 1.15rem;
    line-height: 1.2;
}

.skill-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 0.2rem;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skill-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: var(--transition);
}

.skill-item i {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.skill-item:hover {
    background: var(--accent-white);
    color: #080808;
    border-color: var(--accent-white);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.35);
}

.skill-item:hover i {
    color: #080808;
}

/* Internship Cards */
.internship-card {
    min-width: 350px;
    max-width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    transition: var(--transition);
}

.internship-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-medium);
    transform: translateY(-4px);
}

.company-badge {
    width: 60px;
    height: 60px;
    background: #ffffff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.company-badge img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.company-badge.text-badge {
    background: var(--accent-white);
    color: #080808;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    border: 1px solid var(--border-medium);
}

.internship-duration {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.internship-title {
    font-size: 1.25rem;
    margin-bottom: 0.2rem;
}

.company-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.internship-description {
    font-size: 0.9rem;
    line-height: 1.5;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tech-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
}

/* ==========================================
   Education Section
   ========================================== */
.education {
    padding: 3rem 0;
}

.education-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.education-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem 2.2rem;
    display: flex;
    align-items: center;
    gap: 1.8rem;
    overflow: hidden;
    transition: var(--transition);
}

.education-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-strong);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 255, 255, 0.08);
}

.education-glow {
    position: absolute;
    top: -50%;
    left: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.education-icon-box {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent-white);
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.education-card:hover .education-icon-box {
    background: var(--accent-white);
    color: #080808;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.35);
}

.education-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.education-top-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.education-degree {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin: 0;
}

.education-cgpa-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #4ade80;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.education-cgpa-pill i {
    font-size: 0.8rem;
}

.education-institution {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
}

.education-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.education-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.education-meta-item i {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.education-meta-item.status {
    color: var(--text-primary);
    font-weight: 600;
    gap: 7px;
}

.education-meta-item.status .pulse-indicator {
    width: 6px;
    height: 6px;
}

.meta-separator {
    color: var(--border-medium);
}

@media (max-width: 768px) {
    .education-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.6rem;
        gap: 1.2rem;
    }

    .education-top-line {
        flex-direction: column;
        align-items: flex-start;
    }

    .education-degree {
        font-size: 1.1rem;
    }
}

/* Experience Tabs & Cards */
.experience-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.tab-btn {
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    padding: 0.6rem 1.4rem;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active, .tab-btn:hover {
    background: var(--accent-white);
    color: #080808;
    border-color: var(--accent-white);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.experience-card {
    min-width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    transition: var(--transition);
}

.experience-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-medium);
    transform: translateY(-4px);
}

.card-icon {
    font-size: 1.6rem;
    color: var(--accent-white);
    margin-bottom: 1rem;
}

.experience-title {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.experience-organization {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.experience-duration {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.experience-description {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Certificate Cards */
.certificate-card {
    min-width: 300px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.certificate-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-medium);
    transform: translateY(-4px);
}

.certificate-img-holder {
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: #000;
}

.certificate-img-holder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%);
    transition: transform 0.4s ease, filter 0.4s ease;
}

.certificate-card:hover .certificate-img-holder img {
    filter: grayscale(0%);
    transform: scale(1.04);
}

.certificate-content {
    padding: 1.2rem;
}

.certificate-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.cert-issuer {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.certificate-date {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
}

/* Contact Section */
.contact-container {
    max-width: 650px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    background: var(--bg-main) !important;
    border: 1px solid var(--border-medium) !important;
    color: var(--text-primary) !important;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-white) !important;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.5rem;
}

.submit-btn {
    background: var(--accent-white);
    color: #080808;
    border: none;
    padding: 0.8rem 1.8rem;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.submit-btn:hover {
    background: var(--accent-silver);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.25);
}

.form-status {
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Footer */
.footer {
    background: #040404;
    border-top: 1px solid var(--border-subtle);
    padding: 3.5rem 1.5rem 2rem 1.5rem;
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.social-links {
    display: flex;
    gap: 1.2rem;
}

.social-link {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--accent-white);
    color: #080808;
    transform: translateY(-3px);
}

.footer-bottom {
    max-width: 1240px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .status-badge {
        margin: 0 auto 1.5rem auto;
    }
    
    .hero .description {
        margin: 0 auto 2rem auto;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .hero-socials {
        justify-content: center;
    }
    
    .avatar-3d-scene {
        margin-top: 2.5rem;
    }
    
    .avatar-3d-card {
        width: 270px;
        height: 270px;
    }

    .avatar-ambient-glow {
        width: 270px;
        height: 270px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 60px;
        height: calc(100vh - 60px);
        background: rgba(10, 10, 10, 0.96);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        width: 100%;
        transition: right 0.4s ease;
    }

    .nav-links.nav-active {
        right: 0;
    }

    .burger {
        display: flex;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-container {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .carousel-container {
        padding: 0 3rem;
    }

    .carousel-button {
        width: 40px;
        height: 40px;
    }
}

/* ==========================================
   Scroll Progress Bar
   ========================================== */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #ffffff, #e4e4e7, #38bdf8);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.9), 0 0 20px rgba(56, 189, 248, 0.6);
    z-index: 10000;
    pointer-events: none;
    transition: width 0.08s ease-out;
}

/* ==========================================
   Cinematic Opening Intro Preloader
   ========================================== */
.intro-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    overflow: hidden;
    cursor: pointer;
}

.loader-curtain {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50.5%;
    background: #080808;
    z-index: 1;
    transition: transform 0.95s cubic-bezier(0.77, 0, 0.175, 1);
    will-change: transform;
}

.loader-curtain.top-curtain {
    top: 0;
    transform-origin: top;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.loader-curtain.bottom-curtain {
    bottom: 0;
    transform-origin: bottom;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Radiant seam flare line between curtains */
.loader-seam {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), #38bdf8, rgba(255, 255, 255, 0.9), transparent);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.95), 0 0 35px rgba(56, 189, 248, 0.8);
    z-index: 3;
    transform: scaleX(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

/* When the preloader finishes: split open curtains with radiant seam flash */
.intro-loader.loader-finished .loader-seam {
    transform: scaleX(1);
    opacity: 1;
    animation: flashSeam 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes flashSeam {
    0% { opacity: 0; transform: scaleX(0) scaleY(1); }
    25% { opacity: 1; transform: scaleX(1) scaleY(3); }
    70% { opacity: 0.9; transform: scaleX(1) scaleY(1.5); }
    100% { opacity: 0; transform: scaleX(1) scaleY(0.5); }
}

.intro-loader.loader-finished .loader-curtain.top-curtain {
    transform: translateY(-100%);
}

.intro-loader.loader-finished .loader-curtain.bottom-curtain {
    transform: translateY(100%);
}

.loader-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem;
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.intro-loader.loader-finished .loader-content {
    opacity: 0;
    transform: scale(0.96);
    pointer-events: none;
}

.intro-loader.loader-hidden {
    display: none !important;
}

.loader-skip {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 20;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    padding: 0.45rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    opacity: 0;
    animation: fadeInBadge 0.6s ease forwards 0.8s;
}

.loader-skip:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.loader-hint {
    position: absolute;
    bottom: 2.2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
    opacity: 0;
    animation: fadeInBadge 0.6s ease forwards 1.2s;
    pointer-events: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.loader-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.18em;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInBadge 0.6s ease forwards 0.1s;
}

.loader-name-container {
    overflow: hidden;
    position: relative;
}

.loader-name {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 7vw, 4.8rem);
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1.1;
    margin: 0;
}

.char-span {
    display: inline-block;
    transform: translateY(115%);
    opacity: 0;
    animation: charSlideUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: calc(var(--i) * 0.045s + 0.18s);
}

.char-space {
    width: clamp(0.6rem, 2vw, 1.4rem);
}

@keyframes charSlideUp {
    0% {
        transform: translateY(115%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.loader-role {
    font-size: clamp(0.85rem, 2.2vw, 1.05rem);
    color: var(--text-secondary);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 500;
    margin-top: 1.1rem;
    opacity: 0;
    animation: fadeInRole 0.7s ease forwards 0.65s;
}

@keyframes fadeInBadge {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRole {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.loader-track {
    width: 220px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    margin-top: 1.8rem;
    overflow: hidden;
    position: relative;
}

.loader-fill {
    height: 100%;
    width: 0%;
    background: #ffffff;
    box-shadow: 0 0 10px #ffffff;
    transition: width 0.08s linear;
}

.intro-loader.ready .loader-fill {
    background: linear-gradient(90deg, #ffffff, #38bdf8);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.9);
}

.loader-percentage {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    margin-top: 0.75rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.intro-loader.ready .loader-percentage {
    color: #ffffff;
}

/* ==========================================
   Hero Entrance Animation (After Intro)
   ========================================== */
.hero-content {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-image-container {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.12s,
                transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.12s;
}

body.page-loaded .hero-content {
    opacity: 1;
    transform: translateY(0);
}

body.page-loaded .profile-image-container {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================
   Dynamic Scroll Reveal Animations (Silky Smooth, Zero Jank)
   ========================================== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Subtle, elegant pop for cards on scroll */
.project-card.reveal-on-scroll,
.mini-project-card.reveal-on-scroll,
.skill-category.reveal-on-scroll,
.internship-card.reveal-on-scroll,
.education-card.reveal-on-scroll,
.experience-card.reveal-on-scroll,
.certificate-card.reveal-on-scroll {
    transform: translateY(24px) scale(0.985);
    transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

.project-card.reveal-on-scroll.is-revealed,
.mini-project-card.reveal-on-scroll.is-revealed,
.skill-category.reveal-on-scroll.is-revealed,
.internship-card.reveal-on-scroll.is-revealed,
.education-card.reveal-on-scroll.is-revealed,
.experience-card.reveal-on-scroll.is-revealed,
.certificate-card.reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Section Header Entrance with Underline Glow Reveal */
.section-header.reveal-on-scroll {
    transform: translateY(16px);
}
.section-header.reveal-on-scroll.is-revealed {
    transform: translateY(0);
}

.section-header .section-title {
    position: relative;
    display: inline-block;
}

.section-header .section-title::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.15));
    margin: 8px auto 0;
    border-radius: 2px;
    transition: width 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.section-header.is-revealed .section-title::after {
    width: 48px;
}

/* Snappy Stagger Delay Classes */
.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.10s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.20s; }
.stagger-5 { transition-delay: 0.25s; }

/* ==========================================
   Floating Back To Top Button with Circular Progress
   ========================================== */
.scroll-to-top {
    position: fixed;
    bottom: 2.2rem;
    right: 2.2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(18, 18, 18, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 990;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.35s ease,
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.35s ease,
                background 0.2s ease,
                border-color 0.2s ease,
                box-shadow 0.2s ease;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.45);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 255, 255, 0.25);
}

.scroll-to-top svg.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
    pointer-events: none;
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 2.5;
}

.progress-ring-circle {
    fill: none;
    stroke: #ffffff;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 119.38;
    stroke-dashoffset: 119.38;
    transition: stroke-dashoffset 0.1s linear;
}

.scroll-to-top i {
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 40px;
        height: 40px;
    }
    .scroll-to-top svg.progress-ring {
        width: 40px;
        height: 40px;
    }
    .loader-skip {
        top: 1.2rem;
        right: 1.2rem;
        padding: 0.35rem 0.8rem;
    }
}