/* ==========================================================================
   FUTURISTIC PORTFOLIO STYLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
    /* Color Palette */
    --bg-main: #030305;
    --bg-secondary: #0a0a10;
    --bg-card: rgba(20, 20, 30, 0.6);
    
    --accent-primary: #00f3ff;
    --accent-secondary: #bc13fe;
    
    --text-main: #ffffff;
    --text-muted: #8892b0;
    
    /* Effects */
    --neon-glow-primary: 0 0 10px rgba(0, 243, 255, 0.5), 0 0 20px rgba(0, 243, 255, 0.3);
    --neon-glow-secondary: 0 0 10px rgba(188, 19, 254, 0.5), 0 0 20px rgba(188, 19, 254, 0.3);
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);
    
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none; /* Hide default cursor */
}

h1, h2, h3, h4, .logo {
    font-family: 'Space Grotesk', sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
    cursor: none; /* Let custom cursor handle hover state */
}

ul {
    list-style: none;
}

/* Background Grid Animation */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    perspective: 1000px;
    transform: rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 20s linear infinite;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-main) 80%);
    z-index: -1;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 0 50px; }
}

/* Custom Cursor */
.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(0, 243, 255, 0.5);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Cursor Hover State via JS class */
.cursor-hover .cursor-outline {
    width: 60px;
    height: 60px;
    background-color: rgba(0, 243, 255, 0.1);
    border-color: var(--accent-primary);
}

/* Layout Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
}

header.scrolled {
    background: rgba(3, 3, 5, 0.8);
    border-bottom: var(--glass-border);
    padding: 15px 0;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    color: var(--accent-primary);
    text-shadow: var(--neon-glow-primary);
}

nav ul {
    display: flex;
    gap: 30px;
}

nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    position: relative;
}

nav a::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: var(--transition);
    box-shadow: var(--neon-glow-primary);
}

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

nav a:hover::before, nav a.active::before {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: none;
    z-index: 1001;
}

/* Glitch Effect */
.glitch-wrapper {
    position: relative;
}

.glitch {
    position: relative;
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: -1px;
    z-index: 1;
}

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-main);
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent-primary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--accent-secondary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 83px, 0); }
    20% { clip: rect(65px, 9999px, 63px, 0); }
    40% { clip: rect(11px, 9999px, 16px, 0); }
    60% { clip: rect(96px, 9999px, 7px, 0); }
    80% { clip: rect(54px, 9999px, 83px, 0); }
    100% { clip: rect(21px, 9999px, 51px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(32px, 9999px, 4px, 0); }
    20% { clip: rect(7px, 9999px, 92px, 0); }
    40% { clip: rect(43px, 9999px, 12px, 0); }
    60% { clip: rect(12px, 9999px, 48px, 0); }
    80% { clip: rect(84px, 9999px, 73px, 0); }
    100% { clip: rect(29px, 9999px, 93px, 0); }
}

/* Hero Section */
.hero {
    position: relative;
    padding-top: 150px;
}

.hero-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--accent-primary);
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: block;
    letter-spacing: 2px;
}

.typing-container {
    font-size: 2rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 10px;
    margin-bottom: 30px;
    height: 40px; /* fixed height to prevent layout shift */
}

.hero p {
    max-width: 600px;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* Neon Button */
.btn-group {
    display: flex;
    gap: 20px;
}

.btn-neon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    color: var(--accent-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--accent-primary);
    background: transparent;
    overflow: hidden;
    transition: var(--transition);
    border-radius: 4px;
}

.btn-neon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-primary);
    transition: var(--transition);
    z-index: -1;
}

.btn-neon:hover {
    color: var(--bg-main);
    box-shadow: var(--neon-glow-primary);
}

.btn-neon:hover::before {
    left: 0;
}

.btn-neon.secondary {
    color: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

.btn-neon.secondary::before {
    background: var(--accent-secondary);
}

.btn-neon.secondary:hover {
    box-shadow: var(--neon-glow-secondary);
}

/* Stats */
.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 60px;
    border-top: var(--glass-border);
    padding-top: 30px;
    max-width: fit-content;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-main);
}

.stat-num span {
    color: var(--accent-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title::before {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: var(--accent-primary);
    box-shadow: var(--neon-glow-primary);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.about-text p span {
    color: var(--text-main);
    font-weight: 600;
}

.skills-container {
    margin-top: 30px;
}

.skills-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.skill-tag:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(0, 243, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
    transform: translateY(-2px);
}

.about-image-wrapper {
    position: relative;
}

.about-image {
    width: 100%;
    border-radius: 8px;
    filter: grayscale(100%) contrast(1.2);
    transition: var(--transition);
    position: relative;
    z-index: 2;
    border: var(--glass-border);
}

.about-image-wrapper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    z-index: 1;
    transition: var(--transition);
}

.about-image-wrapper:hover .about-image {
    filter: grayscale(0%);
    transform: translate(10px, 10px);
}

.about-image-wrapper:hover::before {
    transform: translate(-10px, -10px);
    box-shadow: var(--neon-glow-primary);
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* 3D Tilt Card Styles */
.project-card {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    height: 100%;
    transform-style: preserve-3d; /* For 3D elements inside */
    transition: border-color 0.3s ease;
}

.project-card:hover {
    border-color: rgba(0, 243, 255, 0.3);
}

.project-img {
    height: 220px;
    overflow: hidden;
    position: relative;
    transform: translateZ(20px); /* Pops out slightly on tilt */
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img img {
    transform: scale(1.1);
}

.project-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(3, 3, 5, 0.9));
}

.project-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    transform: translateZ(30px); /* Pops out more */
}

.project-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tech-tag {
    font-size: 0.75rem;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--accent-secondary);
    background: rgba(188, 19, 254, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
}

.project-links {
    margin-top: auto;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: var(--transition);
}

.project-link:hover {
    color: var(--accent-primary);
}

/* Contact Section */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 8px;
    transition: var(--transition);
}

.contact-info-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(10px);
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--accent-primary);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 243, 255, 0.05);
    border-radius: 50%;
}

.contact-text h4 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.contact-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

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

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: var(--glass-border);
    border-radius: 4px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.1);
    background: rgba(0, 243, 255, 0.02);
}

/* Footer */
footer {
    padding: 30px 0;
    text-align: center;
    border-top: var(--glass-border);
    margin-top: 50px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--bg-main);
    background: var(--accent-primary);
    box-shadow: var(--neon-glow-primary);
    transform: translateY(-3px);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: 'Space Grotesk', sans-serif;
}

/* Animations Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

/* Responsive */
@media (max-width: 992px) {
    .glitch { font-size: 3rem; }
    .about-grid, .contact-wrapper { grid-template-columns: 1fr; }
    .hero { padding-top: 120px; }
}

@media (max-width: 768px) {
    .cursor-dot, .cursor-outline { display: none; }
    body { cursor: auto; }
    a { cursor: pointer; }

    .mobile-menu-btn { display: block; }
    
    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: rgba(3, 3, 5, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        border-left: var(--glass-border);
    }

    nav ul.active { right: 0; }
    
    .glitch { font-size: 2.2rem; }
    .btn-group { flex-direction: column; }
    .hero-stats { flex-wrap: wrap; gap: 20px; }
}

/* =========================================
   INTRO OVERLAY (BOOT SEQUENCE)
   ========================================= */
#intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-primary);
    font-family: 'Space Grotesk', monospace;
    transition: opacity 1s ease-out, visibility 1s ease-out;
}

#intro-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.intro-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.intro-logo {
    font-size: 3rem;
    animation: pulse-neon 1.5s infinite alternate;
}

.intro-text-wrapper {
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(0, 243, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    width: 0%;
    background: var(--accent-primary);
    box-shadow: var(--neon-glow-primary);
    animation: load-progress 2.5s ease-in-out forwards;
}

@keyframes load-progress {
    0% { width: 0%; }
    50% { width: 60%; }
    100% { width: 100%; }
}

@keyframes pulse-neon {
    0% { text-shadow: 0 0 5px rgba(0, 243, 255, 0.5); transform: scale(1); }
    100% { text-shadow: var(--neon-glow-primary); transform: scale(1.1); }
}

/* =========================================
   HERO 3D HOLOGRAM
   ========================================= */
.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 40px;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    perspective: 1000px;
}

.hologram-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    animation: float-hologram 4s ease-in-out infinite;
}

.hologram-cube {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    animation: rotate-cube 15s linear infinite;
}

.cube-face {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(0, 243, 255, 0.05);
    border: 2px solid rgba(0, 243, 255, 0.4);
    box-shadow: inset 0 0 20px rgba(0, 243, 255, 0.2), 0 0 10px rgba(0, 243, 255, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 5rem;
    color: rgba(0, 243, 255, 0.7);
}

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

.hologram-shadow {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 20px;
    background: rgba(0, 243, 255, 0.2);
    border-radius: 50%;
    filter: blur(10px);
    animation: shadow-pulse 4s ease-in-out infinite;
}

@keyframes rotate-cube {
    0% { transform: rotateX(-20deg) rotateY(0deg); }
    100% { transform: rotateX(-20deg) rotateY(360deg); }
}

@keyframes float-hologram {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes shadow-pulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.5; }
    50% { transform: translateX(-50%) scale(0.8); opacity: 0.2; }
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-visual {
        height: 300px;
        margin-top: 40px;
    }
    .hero-stats {
        margin: 60px auto 0;
    }
}