/* ======================================================
   PORTFOLIO — Aakash J | Business Analyst & AI Strategist
   Immersive 3D Portfolio with Seamless Transitions
   ====================================================== */

/* ── CSS Variables ──────────────────────────────────── */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c2a;
    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --text-muted: #55556a;
    --accent-1: #6C63FF;
    --accent-2: #00D4AA;
    --accent-3: #FF6B6B;
    --gradient-1: linear-gradient(135deg, #6C63FF, #00D4AA);
    --gradient-2: linear-gradient(135deg, #6C63FF, #a855f7);
    --gradient-3: linear-gradient(135deg, #00D4AA, #6C63FF);
    --border-color: rgba(108, 99, 255, 0.15);
    --shadow-lg: 0 25px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(108, 99, 255, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition-smooth: cubic-bezier(0.22, 1, 0.36, 1);
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(108, 99, 255, 0.3);
    color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ── Cursor Glow ────────────────────────────────────── */
.cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108,99,255,0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    will-change: left, top;
}

/* ── Particle Canvas ────────────────────────────────── */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ── Click Ripple ───────────────────────────────────── */
.click-ripple-container {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    overflow: hidden;
}

.click-ripple {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(108, 99, 255, 0.5);
    transform: translate(-50%, -50%) scale(0);
    animation: rippleExpand 0.8s ease-out forwards;
    pointer-events: none;
}

.click-ripple:nth-child(2n) {
    border-color: rgba(0, 212, 170, 0.4);
    animation-duration: 1s;
    animation-delay: 0.1s;
}

@keyframes rippleExpand {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* ── Aurora Gradient Blobs ──────────────────────────── */
.aurora-container {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
    will-change: transform;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #6C63FF, transparent 70%);
    top: -10%;
    left: -5%;
    animation: auroraFloat1 20s ease-in-out infinite;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #00D4AA, transparent 70%);
    top: 30%;
    right: -8%;
    animation: auroraFloat2 25s ease-in-out infinite;
}

.blob-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #a855f7, transparent 70%);
    bottom: 10%;
    left: 15%;
    animation: auroraFloat3 22s ease-in-out infinite;
}

.blob-4 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #ec4899, transparent 70%);
    top: 60%;
    right: 20%;
    animation: auroraFloat4 18s ease-in-out infinite;
    opacity: 0.06;
}

@keyframes auroraFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(80px, 50px) scale(1.1); }
    50% { transform: translate(30px, 100px) scale(0.95); }
    75% { transform: translate(-50px, 40px) scale(1.05); }
}

@keyframes auroraFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-70px, 60px) scale(1.08); }
    50% { transform: translate(-40px, -80px) scale(0.9); }
    75% { transform: translate(50px, -30px) scale(1.12); }
}

@keyframes auroraFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(60px, -70px) scale(1.15); }
    66% { transform: translate(-40px, 50px) scale(0.92); }
}

@keyframes auroraFloat4 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-60px, -40px) rotate(30deg); }
}

/* ── Parallax Floating Orbs ─────────────────────────── */
.orbs-container {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.parallax-orb {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
    transition: transform 0.1s linear;
}

.orb-1 {
    width: 6px;
    height: 6px;
    background: rgba(108, 99, 255, 0.6);
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.3);
    top: 15%;
    left: 10%;
    animation: orbPulse 3s ease-in-out infinite;
}

.orb-2 {
    width: 4px;
    height: 4px;
    background: rgba(0, 212, 170, 0.7);
    box-shadow: 0 0 12px rgba(0, 212, 170, 0.3);
    top: 25%;
    right: 15%;
    animation: orbPulse 4s ease-in-out infinite 0.5s;
}

.orb-3 {
    width: 8px;
    height: 8px;
    background: rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
    top: 55%;
    left: 5%;
    animation: orbPulse 3.5s ease-in-out infinite 1s;
}

.orb-4 {
    width: 3px;
    height: 3px;
    background: rgba(108, 99, 255, 0.8);
    box-shadow: 0 0 10px rgba(108, 99, 255, 0.4);
    top: 70%;
    right: 8%;
    animation: orbPulse 2.5s ease-in-out infinite 0.3s;
}

.orb-5 {
    width: 5px;
    height: 5px;
    background: rgba(0, 212, 170, 0.5);
    box-shadow: 0 0 14px rgba(0, 212, 170, 0.3);
    top: 40%;
    left: 80%;
    animation: orbPulse 4.5s ease-in-out infinite 1.5s;
}

.orb-6 {
    width: 7px;
    height: 7px;
    background: rgba(236, 72, 153, 0.4);
    box-shadow: 0 0 18px rgba(236, 72, 153, 0.2);
    top: 85%;
    left: 30%;
    animation: orbPulse 3.8s ease-in-out infinite 0.8s;
}

.orb-7 {
    width: 4px;
    height: 4px;
    background: rgba(108, 99, 255, 0.6);
    box-shadow: 0 0 12px rgba(108, 99, 255, 0.3);
    top: 10%;
    left: 55%;
    animation: orbPulse 3.2s ease-in-out infinite 2s;
}

.orb-8 {
    width: 5px;
    height: 5px;
    background: rgba(0, 212, 170, 0.6);
    box-shadow: 0 0 14px rgba(0, 212, 170, 0.3);
    top: 65%;
    left: 60%;
    animation: orbPulse 4s ease-in-out infinite 1.2s;
}

@keyframes orbPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* ── Reactive Grid ──────────────────────────────────── */
.reactive-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

.grid-svg {
    width: 100%;
    height: 100%;
}

/* ── Hero DNA Helix ─────────────────────────────────── */
.hero-dna-helix {
    position: absolute;
    left: 3%;
    top: 10%;
    bottom: 10%;
    width: 40px;
    z-index: 0;
    opacity: 0.15;
    overflow: hidden;
}

.dna-strand {
    position: absolute;
    width: 2px;
    height: 100%;
    top: 0;
}

.strand-1 {
    left: 8px;
    background: linear-gradient(to bottom,
        transparent,
        var(--accent-1) 10%,
        transparent 20%,
        var(--accent-2) 30%,
        transparent 40%,
        var(--accent-1) 50%,
        transparent 60%,
        var(--accent-2) 70%,
        transparent 80%,
        var(--accent-1) 90%,
        transparent
    );
    animation: dnaScroll 8s linear infinite;
}

.strand-2 {
    right: 8px;
    background: linear-gradient(to bottom,
        transparent,
        var(--accent-2) 10%,
        transparent 20%,
        var(--accent-1) 30%,
        transparent 40%,
        var(--accent-2) 50%,
        transparent 60%,
        var(--accent-1) 70%,
        transparent 80%,
        var(--accent-2) 90%,
        transparent
    );
    animation: dnaScroll 8s linear infinite reverse;
}

@keyframes dnaScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* ── Section Background Accents ─────────────────────── */
.section-bg-accent {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.about-bg-accent::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.06), transparent 70%);
    top: 0;
    right: -100px;
    animation: sectionGlow 10s ease-in-out infinite;
}

.about-bg-accent::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 170, 0.05), transparent 70%);
    bottom: -50px;
    left: -50px;
    animation: sectionGlow 12s ease-in-out infinite 3s;
}

.achievements-bg-accent::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.05), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: sectionGlow 14s ease-in-out infinite 1s;
}

.projects-bg-accent::before {
    content: '';
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 170, 0.05), transparent 70%);
    top: -100px;
    left: -100px;
    animation: sectionGlow 11s ease-in-out infinite 2s;
}

.projects-bg-accent::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.04), transparent 70%);
    bottom: -50px;
    right: -50px;
    animation: sectionGlow 13s ease-in-out infinite;
}

.contact-bg-accent::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.06), transparent 70%);
    top: -150px;
    right: -150px;
    animation: sectionGlow 15s ease-in-out infinite 4s;
}

@keyframes sectionGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

.contact-bg-accent::before {
    transform-origin: center center;
}

/* ── Meteor / Shooting Stars (canvas-drawn, but we also add CSS ones) ── */
.meteor {
    position: fixed;
    width: 2px;
    height: 80px;
    background: linear-gradient(to bottom, rgba(108, 99, 255, 0.8), transparent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transform: rotate(-45deg);
    animation: meteorShoot 1.2s ease-in forwards;
}

@keyframes meteorShoot {
    0% { opacity: 0; transform: rotate(-45deg) translateY(-100px); }
    10% { opacity: 1; }
    100% { opacity: 0; transform: rotate(-45deg) translateY(calc(100vh + 200px)); }
}

/* ── Magnetic Field Indicator (subtle ring around cursor) ── */
.magnetic-field {
    position: fixed;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 1px solid rgba(108, 99, 255, 0.04);
    pointer-events: none;
    z-index: 9997;
    transform: translate(-50%, -50%);
    will-change: left, top;
    transition: width 0.3s, height 0.3s, border-color 0.3s;
}

.magnetic-field.active {
    width: 250px;
    height: 250px;
    border-color: rgba(108, 99, 255, 0.1);
}

/* ── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
    background: var(--accent-1);
    border-radius: 10px;
}

/* ── Navigation ─────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
    transition: all 0.4s var(--transition-smooth);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    height: 64px;
}

.nav-logo { cursor: pointer; }

.logo-svg {
    width: 48px;
    height: 48px;
    transition: transform 0.4s var(--transition-bounce);
}

.nav-logo:hover .logo-svg {
    transform: scale(1.1) rotate(5deg);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 4px 0;
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    border-radius: 2px;
    transition: width 0.3s var(--transition-smooth);
}

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

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

/* ── Buttons ────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--gradient-1);
    color: #fff;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #00D4AA, #6C63FF);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
}

.btn-primary:hover::before { opacity: 1; }

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108, 99, 255, 0.4);
}

.btn-primary i {
    transition: transform 0.3s var(--transition-smooth);
}

.btn-primary:hover i {
    transform: translateX(4px);
}

.btn-primary.btn-small {
    padding: 10px 24px;
    font-size: 0.85rem;
}

.btn-primary.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s var(--transition-smooth);
}

.btn-secondary:hover {
    border-color: var(--accent-1);
    background: rgba(108, 99, 255, 0.08);
    transform: translateY(-2px);
}

.nav-cta { display: flex; }

/* ── Mobile Menu ────────────────────────────────────── */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 28px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    padding: 100px 40px 40px;
    gap: 24px;
    z-index: 999;
    transition: right 0.4s var(--transition-smooth);
    border-left: 1px solid var(--border-color);
}

.mobile-menu.active { right: 0; }

.mobile-link {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s, transform 0.3s;
}

.mobile-link:hover {
    color: var(--text-primary);
    transform: translateX(8px);
}

/* ── HERO SECTION ───────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 40px 80px;
    overflow: hidden;
    perspective: 1000px;
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(108, 99, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108, 99, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content {
    max-width: 800px;
    text-align: center;
    z-index: 2;
    animation: heroFadeIn 1.2s var(--transition-smooth) forwards;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(40px) rotateX(5deg); }
    to   { opacity: 1; transform: translateY(0) rotateX(0); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(0, 212, 170, 0.08);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--accent-2);
    margin-bottom: 32px;
    animation: badgePulse 3s ease-in-out infinite;
}

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

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 rgba(0, 212, 170, 0); }
    50% { box-shadow: 0 0 20px rgba(0, 212, 170, 0.1); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.title-line { display: block; overflow: hidden; }

.title-word {
    display: inline-block;
    animation: wordReveal 0.8s var(--transition-smooth) forwards;
    animation-delay: calc(var(--delay) * 0.15s + 0.3s);
    opacity: 0;
    transform: translateY(100%);
}

@keyframes wordReveal {
    to { opacity: 1; transform: translateY(0); }
}

.title-name {
    margin-top: 4px;
}

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

.hero-role {
    margin-bottom: 24px;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.role-typewriter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.role-static {
    font-weight: 600;
    color: var(--text-primary);
}

.role-divider {
    color: var(--accent-1);
    opacity: 0.5;
}

.role-dynamic {
    color: var(--accent-2);
    font-weight: 500;
    min-width: 180px;
}

.cursor-blink {
    animation: blink 1s step-end infinite;
    color: var(--accent-2);
}

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

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

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

.stat-number {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Floating 3D Cube ───────────────────────────────── */
.hero-3d-element {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    perspective: 600px;
}

.floating-cube {
    width: 120px;
    height: 120px;
    position: relative;
    transform-style: preserve-3d;
    animation: cubeRotate 15s linear infinite, cubeFloat 6s ease-in-out infinite;
}

@keyframes cubeRotate {
    from { transform: rotateX(0deg) rotateY(0deg); }
    to   { transform: rotateX(360deg) rotateY(360deg); }
}

@keyframes cubeFloat {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -20px; }
}

.cube-face {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 1px solid rgba(108, 99, 255, 0.2);
    background: rgba(108, 99, 255, 0.03);
    backdrop-filter: blur(4px);
}

.cube-face.front  { transform: translateZ(60px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(60px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(60px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(60px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(60px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(60px); }

/* ── Scroll Indicator ───────────────────────────────── */
.scroll-indicator {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    animation: fadeInUp 1s 2s forwards;
    opacity: 0;
    padding: 40px 0;
    z-index: 2;
}

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

.scroll-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.scroll-wheel {
    width: 3px;
    height: 8px;
    background: var(--accent-1);
    border-radius: 3px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
    0%   { top: 6px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}

/* ── SECTIONS COMMON ────────────────────────────────── */
.section {
    padding: 120px 0;
    position: relative;
    z-index: 1;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.section-header {
    text-align: center;
    margin-bottom: 72px;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-2);
    background: rgba(0, 212, 170, 0.08);
    border: 1px solid rgba(0, 212, 170, 0.15);
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
}

.section-subtitle {
    color: var(--text-secondary);
    margin-top: 12px;
    font-size: 1rem;
}

/* ── Reveal Animations ──────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s var(--transition-smooth);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-60px) rotateY(5deg);
    transition: all 0.8s var(--transition-smooth);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0) rotateY(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px) rotateY(-5deg);
    transition: all 0.8s var(--transition-smooth);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0) rotateY(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.85) rotateX(5deg);
    transition: all 0.8s var(--transition-smooth);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1) rotateX(0);
}

/* ── ABOUT SECTION ──────────────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 64px;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    perspective: 800px;
}

.about-image-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border: 1px dashed var(--border-color);
    transition: transform 0.6s var(--transition-smooth);
}

.about-image-placeholder i {
    font-size: 3rem;
    color: var(--accent-1);
    opacity: 0.5;
}

.about-image-placeholder:hover {
    transform: rotateY(-5deg) rotateX(3deg);
}

.about-image-border {
    position: absolute;
    inset: -8px;
    border-radius: calc(var(--radius-lg) + 8px);
    border: 1px solid var(--border-color);
    pointer-events: none;
}

.about-floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.85rem;
    font-weight: 500;
    animation: cardFloat 4s ease-in-out infinite;
    z-index: 3;
}

.about-floating-card i {
    font-size: 1.2rem;
    color: var(--accent-1);
}

.card-1 {
    top: 10%;
    right: -30px;
    animation-delay: 0s;
}

.card-2 {
    bottom: 10%;
    left: -30px;
    animation-delay: 2s;
}

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

.about-text {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1rem;
}

.about-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.skill-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(108, 99, 255, 0.06);
    border: 1px solid rgba(108, 99, 255, 0.12);
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.skill-chip:hover {
    background: rgba(108, 99, 255, 0.12);
    color: var(--text-primary);
    border-color: var(--accent-1);
    transform: translateY(-2px);
}

.skill-chip i {
    color: var(--accent-1);
    font-size: 0.85rem;
}

/* ── ACHIEVEMENTS SECTION ───────────────────────────── */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.achievement-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: all 0.5s var(--transition-smooth);
    position: relative;
    overflow: hidden;
    cursor: default;
    transform-style: preserve-3d;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.4s var(--transition-smooth);
}

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

.achievement-card:hover {
    transform: translateY(-8px) rotateX(2deg);
    border-color: rgba(108, 99, 255, 0.3);
    box-shadow: var(--shadow-glow);
    background: var(--bg-card-hover);
}

.achievement-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievement-icon i {
    font-size: 1.4rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.achievement-image-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: rgba(108, 99, 255, 0.04);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.achievement-image-placeholder i {
    font-size: 1.5rem;
    opacity: 0.4;
}

.achievement-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.achievement-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.achievement-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-2);
    background: rgba(0, 212, 170, 0.08);
    padding: 4px 12px;
    border-radius: 50px;
}

/* ── PROJECTS SECTION ───────────────────────────────── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s var(--transition-smooth);
    transform-style: preserve-3d;
    position: relative;
    perspective: 800px;
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    opacity: 0;
    background: linear-gradient(135deg, rgba(108,99,255,0.08), rgba(0,212,170,0.08));
    transition: opacity 0.4s;
    pointer-events: none;
}

.project-card:hover::after { opacity: 1; }

.project-card:hover {
    transform: translateY(-8px) rotateX(2deg) rotateY(-1deg);
    border-color: rgba(108, 99, 255, 0.3);
    box-shadow: 0 20px 60px rgba(108, 99, 255, 0.15);
}

.project-card-image {
    width: 100%;
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.08), rgba(0, 212, 170, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-card-image i {
    font-size: 3rem;
    color: var(--accent-1);
    opacity: 0.3;
    transition: all 0.5s var(--transition-smooth);
}

.project-card:hover .project-card-image i {
    transform: scale(1.15) rotateZ(5deg);
    opacity: 0.5;
}

.project-card-body {
    padding: 28px;
}

.project-card-category {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.project-card-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.project-card:hover .project-card-title {
    color: var(--accent-2);
}

.project-card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 18px;
}

.project-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-tag {
    padding: 4px 12px;
    background: rgba(108, 99, 255, 0.06);
    border: 1px solid rgba(108, 99, 255, 0.1);
    border-radius: 50px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.project-card-arrow {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(108, 99, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-1);
    transition: all 0.4s var(--transition-smooth);
    opacity: 0;
    transform: translate(-10px, 10px);
    z-index: 2;
}

.project-card:hover .project-card-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

/* ── PROJECT MODAL ──────────────────────────────────── */
.project-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    perspective: 1200px;
}

.project-modal.active {
    pointer-events: all;
    opacity: 1;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    transition: all 0.6s var(--transition-smooth);
}

.project-modal.active .modal-backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    overflow-y: auto;
    transform: scale(0.6) rotateX(15deg) translateY(60px);
    opacity: 0;
    transition: all 0.6s var(--transition-smooth);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.project-modal.active .modal-content {
    transform: scale(1) rotateX(0) translateY(0);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 107, 107, 0.3);
    transform: rotate(90deg);
}

.modal-hero {
    width: 100%;
    height: 280px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 32px;
    overflow: hidden;
}

.modal-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-secondary), transparent 60%);
    z-index: 1;
}

.modal-category {
    position: relative;
    z-index: 2;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.modal-title {
    position: relative;
    z-index: 2;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
}

.modal-body {
    padding: 32px;
}

.modal-meta {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.meta-item i { color: var(--accent-1); }

.modal-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 28px;
}

.modal-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.modal-tech .tech-tag {
    padding: 6px 16px;
    background: rgba(108, 99, 255, 0.08);
    border: 1px solid rgba(108, 99, 255, 0.15);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--accent-1);
    font-weight: 500;
}

.modal-highlights h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.modal-highlights ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-highlights li {
    padding-left: 24px;
    position: relative;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-highlights li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-2);
    font-weight: 700;
}

/* Scrollbar inside modal */
.modal-content::-webkit-scrollbar { width: 4px; }
.modal-content::-webkit-scrollbar-thumb {
    background: var(--accent-1);
    border-radius: 4px;
}

/* ── CONTACT SECTION ────────────────────────────────── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 32px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: rgba(108, 99, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-1);
    flex-shrink: 0;
}

.contact-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.contact-item a {
    color: var(--text-primary);
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--accent-2);
}

.social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-link {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all 0.4s var(--transition-smooth);
}

.social-link:hover {
    background: var(--accent-1);
    border-color: var(--accent-1);
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(108, 99, 255, 0.3);
}

/* ── Contact Form ───────────────────────────────────── */
.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 0 8px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group textarea {
    resize: none;
}

.form-group label {
    position: absolute;
    top: 16px;
    left: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.3s var(--transition-smooth);
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: -8px;
    font-size: 0.72rem;
    color: var(--accent-1);
}

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.4s var(--transition-smooth);
}

.form-group input:focus ~ .form-line,
.form-group textarea:focus ~ .form-line {
    width: 100%;
}

/* ── FOOTER ─────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 48px 0 32px;
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.footer-logo-svg {
    width: 40px;
    height: 40px;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: all 0.3s;
}

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

.footer-divider {
    height: 1px;
    background: var(--border-color);
    margin-bottom: 24px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-copyright {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.footer-tagline {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.alien-icon {
    font-size: 1.2rem;
    animation: alienBounce 2s ease-in-out infinite;
}

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

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1024px) {
    .hero-3d-element { display: none; }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-image-wrapper { max-width: 360px; margin: 0 auto; }
    .achievements-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-links, .nav-cta { display: none; }
    .mobile-menu-btn { display: flex; }

    .hero { padding: 100px 20px 60px; }
    .hero-title { font-size: clamp(2.4rem, 8vw, 3.5rem); }
    .hero-stats { flex-direction: column; gap: 20px; }
    .hero-cta { flex-direction: column; align-items: center; }

    .section { padding: 80px 0; }
    .section-container { padding: 0 20px; }

    .projects-grid { grid-template-columns: 1fr; }
    .achievements-grid { grid-template-columns: 1fr; }

    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .contact-form-wrapper { padding: 24px; }

    .footer-top, .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }

    .modal-content { width: 95%; max-height: 90vh; border-radius: var(--radius-lg); }
    .modal-hero { height: 200px; padding: 24px; }
    .modal-title { font-size: 1.5rem; }
    .modal-body { padding: 24px; }
}

@media (max-width: 480px) {
    .navbar { padding: 0 20px; }
    .hero-subtitle { font-size: 0.95rem; }
    .role-typewriter { flex-direction: column; gap: 4px; }
    .role-divider { display: none; }
}
