:root {
    --bg-dark: #050505;
    --bg-card: rgba(15, 15, 15, 0.7);
    --accent-cyan: #00f2ff;
    --accent-purple: #7000ff;
    --accent-blue: #0066ff;
    --text-main: #e0e0e0;
    --text-dim: #a0a0a0;
    --glass-border: rgba(255, 255, 255, 0.1);
    --neon-shadow-cyan: 0 0 15px rgba(0, 242, 255, 0.3);
    --neon-shadow-purple: 0 0 15px rgba(112, 0, 255, 0.3);
    --font-tech: 'Rajdhani', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
    --nav-height: 80px;
    --container-width: 1200px;
    --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@keyframes float-slow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(112, 0, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0, 242, 255, 0.05) 0%, transparent 40%);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.03;
    pointer-events: none;
    z-index: 9998;
}

/* Custom Cursor */
#custom-cursor {
    width: 20px;
    height: 20px;
    background: var(--accent-cyan);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease, background 0.3s ease;
    box-shadow: 0 0 10px var(--accent-cyan);
}

#custom-cursor.hover {
    transform: scale(2.5);
    background: white;
    box-shadow: 0 0 20px white;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, var(--accent-cyan), var(--accent-purple));
    z-index: 1001;
    width: 0%;
    box-shadow: 0 0 10px var(--accent-cyan);
}

h1, h2, h3, h4 {
    font-family: var(--font-tech);
    text-transform: uppercase;
    letter-spacing: 2px;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism Utility */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* Background Canvas */
#hero-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
    display: flex;
    align-items: center;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-tech);
}

.neon-text {
    color: var(--accent-cyan);
    text-shadow: var(--neon-shadow-cyan);
}

.accent-text {
    color: var(--text-main);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dim);
}

.nav-links a:hover {
    color: var(--accent-cyan);
    text-shadow: var(--neon-shadow-cyan);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-content h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.hero-content .subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* Hero Status Widget */
.hero-status {
    position: absolute;
    bottom: 10%;
    right: 5%;
    text-align: right;
    font-family: var(--font-tech);
    font-size: 0.7rem;
    color: var(--accent-cyan);
    opacity: 0.6;
    border-right: 2px solid var(--accent-cyan);
    padding-right: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.status-item span {
    display: block;
    text-transform: uppercase;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-family: var(--font-tech);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 242, 255, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.btn-secondary:hover {
    background: rgba(0, 242, 255, 0.1);
    transform: translateY(-5px);
}

/* Tech Stack */
.stack-section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-cyan);
    box-shadow: var(--neon-shadow-cyan);
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
}

.stack-item {
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.stack-item i {
    width: 48px;
    height: 48px;
    color: var(--text-dim);
    transition: var(--transition-smooth);
}

.stack-item:hover i {
    color: white;
    transform: scale(1.1);
}

/* Specific Stack Glows */
.stack-item[title="Flutter"]:hover { box-shadow: 0 0 30px rgba(0, 242, 255, 0.2); border-color: #00f2ff; }
.stack-item[title="Dart"]:hover { box-shadow: 0 0 30px rgba(0, 102, 255, 0.2); border-color: #0066ff; }
.stack-item[title="Rust"]:hover { box-shadow: 0 0 30px rgba(255, 111, 0, 0.2); border-color: #ff6f00; }
.stack-item[title="Python"]:hover { box-shadow: 0 0 30px rgba(255, 214, 0, 0.2); border-color: #ffd600; }

.stack-item span {
    font-weight: 700;
    letter-spacing: 2px;
    font-family: var(--font-tech);
}

.stack-item:hover {
    border-color: var(--accent-cyan);
    box-shadow: var(--neon-shadow-cyan);
    transform: translateY(-10px);
}

/* Projects Grid */
.projects-section {
    padding: 100px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent,
        transparent,
        transparent,
        var(--accent-cyan)
    );
    animation: rotate-border 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

@keyframes rotate-border {
    100% { transform: rotate(360deg); }
}

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

.project-card .glass-inner {
    background: var(--bg-card);
    height: 100%;
    width: 100%;
    border-radius: 16px;
    margin: 1px;
    display: flex;
    flex-direction: column;
}

.project-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #111;
    position: relative;
}

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--accent-cyan), transparent);
    opacity: 0.3;
    pointer-events: none;
    animation: scanline 3s linear infinite;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    filter: saturate(0.8) brightness(0.8);
}

.project-info {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-cyan);
}

.project-info p {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.tag {
    font-size: 0.7rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--accent-cyan);
    font-family: var(--font-tech);
}

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

.icon-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-tech);
    font-weight: 600;
}

.project-card:hover {
    transform: translateY(-15px);
    border-color: var(--accent-cyan);
    box-shadow: var(--neon-shadow-cyan);
}

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

/* Placeholder card */
.project-card.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed var(--glass-border);
}

.pulse-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.5; }
}

/* About Section */
.about-section {
    padding: 120px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.philosophy-list {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.philosophy-list li {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: var(--transition-smooth);
}

.philosophy-list li:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 242, 255, 0.2);
    transform: translateX(10px);
}

.philosophy-list li i {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    color: var(--accent-cyan);
    margin-top: 5px;
}

.philosophy-list h4 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.philosophy-list p {
    color: var(--text-dim);
}

.about-visual {
    display: flex;
    justify-content: center;
}

.tech-orb {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.orb-inner {
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, var(--accent-cyan), var(--accent-purple));
    border-radius: 50%;
    filter: blur(40px);
    animation: float 4s ease-in-out infinite;
}

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

/* Footer */
.footer {
    border-radius: 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
    padding: 80px 0 40px;
    margin-top: 100px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 60px;
}

.footer-brand p {
    margin-top: 1.5rem;
    color: var(--text-dim);
}

.footer h4 {
    margin-bottom: 1.5rem;
    color: var(--accent-cyan);
}

.footer ul li {
    margin-bottom: 0.8rem;
}

.footer ul li a {
    color: var(--text-dim);
}

.footer ul li a:hover {
    color: var(--accent-cyan);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
}

.social-icons a i {
    width: 24px;
    height: 24px;
    color: var(--text-dim);
    transition: all 0.3s ease;
}

.social-icons a:hover i {
    color: var(--accent-cyan);
    transform: scale(1.2);
}

.footer-donations p {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 40px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Scroll Animations */
[data-reveal] {
    opacity: 0;
    transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal="bottom"] {
    transform: translateY(100px);
}

[data-reveal="left"] {
    transform: translateX(-100px);
}

[data-reveal="right"] {
    transform: translateX(100px);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translate(0, 0);
}

/* Staggered Reveals */
.revealed .stack-item:nth-child(1) { transition-delay: 0.1s; }
.revealed .stack-item:nth-child(2) { transition-delay: 0.2s; }
.revealed .stack-item:nth-child(3) { transition-delay: 0.3s; }
.revealed .stack-item:nth-child(4) { transition-delay: 0.4s; }

/* Typing Cursor Animation */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: var(--accent-cyan);
    margin-left: 2px;
    animation: blink 0.8s infinite;
    vertical-align: middle;
}

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

/* Glitch Effect */
.glitch {
    position: relative;
    color: white;
}

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

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

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

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    4.1% { clip: rect(89px, 9999px, 98px, 0); }
    /* ... more keyframes would go here for a true glitch, keeping it simple for now ... */
    100% { clip: rect(67px, 9999px, 122px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(100px, 9999px, 100px, 0); }
    100% { clip: rect(0, 9999px, 0, 0); }
}

/* Responsive */
@media (max-width: 968px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-visual {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
