:root {
    --bg-primary: #050508;
    --bg-secondary: #0a0a10;
    --accent-cyan: #00f0ff;
    --accent-violet: #7b2fff;
    --text-main: #e0e0e0;
    --text-muted: #888899;
    --font-heading: 'Space Mono', monospace;
    --font-heading-alt: 'Rajdhani', sans-serif;
    --font-body: 'DM Mono', monospace;
    --glass-bg: rgba(10, 10, 16, 0.6);
    --glass-border: rgba(0, 240, 255, 0.1);
    --glow-cyan: 0 0 10px rgba(0, 240, 255, 0.5), 0 0 20px rgba(0, 240, 255, 0.3);
    --glow-violet: 0 0 10px rgba(123, 47, 255, 0.5), 0 0 20px rgba(123, 47, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Hide default cursor */
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: #fff;
    font-weight: 700;
}

.glow-text {
    text-shadow: var(--glow-cyan);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), transparent);
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    animation: grain 8s steps(10) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

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

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

.cursor-trail {
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent-cyan);
    opacity: 0.6;
    transition: width 0.2s, height 0.2s;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: padding 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: -1px;
    text-shadow: var(--glow-cyan);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s;
    font-family: var(--font-heading-alt);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-cyan);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px var(--accent-cyan);
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-cyan);
}

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

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background-color: var(--accent-cyan);
    transition: 0.3s;
}

/* Hero Section */
#hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    letter-spacing: -2px;
}

.typewriter-container {
    font-size: 1.8rem;
    color: var(--accent-violet);
    margin-bottom: 3rem;
    font-family: var(--font-heading-alt);
    text-shadow: var(--glow-violet);
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--accent-cyan);
    text-decoration: none;
    border: 1px solid var(--accent-cyan);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(0, 240, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.cta-button:hover {
    background: rgba(0, 240, 255, 0.15);
    box-shadow: var(--glow-cyan);
    text-shadow: 0 0 5px var(--accent-cyan);
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 60%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease-out;
    opacity: 0;
}

.cta-button:active::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    transition: 0s;
}

/* Sections General */
.section {
    padding: 6rem 0;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

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

/* About Section */
.about-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
}

.about-avatar {
    perspective: 1000px;
    width: 250px;
    height: 300px;
    margin: 0 auto;
}

.card-3d {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 1s;
    transform-style: preserve-3d;
    animation: rotateCard 10s infinite linear;
}

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

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--accent-cyan);
    background: var(--bg-secondary);
    box-shadow: var(--glow-cyan);
}

.card-front {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(123, 47, 255, 0.1));
}

.card-back {
    transform: rotateY(180deg);
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(123, 47, 255, 0.1), rgba(0, 240, 255, 0.1));
    border-color: var(--accent-violet);
    box-shadow: var(--glow-violet);
}

.monogram {
    font-family: var(--font-heading);
    font-size: 8rem;
    color: var(--accent-cyan);
    text-shadow: var(--glow-cyan);
}

.tagline {
    font-family: var(--font-heading-alt);
    font-size: 1.5rem;
    color: var(--accent-violet);
    text-shadow: var(--glow-violet);
}

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

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.skill-category h3 {
    font-size: 1.2rem;
    color: var(--accent-violet);
    margin-bottom: 1.5rem;
    font-family: var(--font-heading-alt);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.pill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-pill {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.skill-pill:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
    color: #fff;
    transform: translateY(-2px);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border-top: 2px solid var(--accent-violet);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.project-card:hover {
    box-shadow: 0 10px 30px rgba(123, 47, 255, 0.2);
    z-index: 10;
}

.card-content {
    padding: 2rem;
    transform: translateZ(30px); /* For 3D tilt effect */
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    min-height: 80px;
}

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

.project-tags span {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-cyan);
    border-radius: 4px;
    font-family: var(--font-heading-alt);
}

.project-link {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    transition: color 0.3s, text-shadow 0.3s;
}

.project-link:hover {
    color: var(--accent-cyan);
    text-shadow: var(--glow-cyan);
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(5px);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: scale(1.05);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.1), 0 0 20px rgba(0, 240, 255, 0.1);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    text-shadow: var(--glow-cyan);
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: #fff;
}

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

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-details {
    margin-bottom: 3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-icon {
    font-size: 1.5rem;
    text-shadow: var(--glow-cyan);
}

.contact-item a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--accent-cyan);
    text-shadow: var(--glow-cyan);
}

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

.social-link {
    color: var(--text-muted);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
    transform: translateY(-5px);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.submit-button {
    background: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 1rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 55px;
}

.submit-button:hover {
    background: rgba(0, 240, 255, 0.1);
    box-shadow: var(--glow-cyan);
}

.submit-button.success {
    background: var(--accent-cyan);
    color: var(--bg-primary);
}

.btn-text {
    transition: opacity 0.3s;
}

.submit-button.success .btn-text {
    opacity: 0;
}

.success-checkmark {
    position: absolute;
    width: 30px;
    height: 30px;
    display: none;
}

.submit-button.success .success-checkmark {
    display: block;
}

.check-icon {
    width: 30px;
    height: 30px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
}

.check-icon::before, .check-icon::after {
    content: '';
    height: 100px;
    position: absolute;
    background: var(--accent-cyan);
    transform: rotate(-45deg);
}

.icon-line {
    height: 3px;
    background-color: var(--bg-primary);
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}

.icon-line.line-tip {
    top: 15px;
    left: 4px;
    width: 10px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}

.icon-line.line-long {
    top: 12px;
    right: 4px;
    width: 18px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}

@keyframes icon-line-tip {
    0% { width: 0; left: 1px; top: 10px; }
    54% { width: 0; left: 1px; top: 10px; }
    70% { width: 10px; left: 4px; top: 15px; }
    100% { width: 10px; left: 4px; top: 15px; }
}

@keyframes icon-line-long {
    0% { width: 0; right: 15px; top: 20px; }
    65% { width: 0; right: 15px; top: 20px; }
    84% { width: 18px; right: 4px; top: 12px; }
    100% { width: 18px; right: 4px; top: 12px; }
}

/* Footer */
footer {
    border-top: 1px solid;
    border-image: linear-gradient(90deg, transparent, var(--accent-cyan), transparent) 1;
    padding: 2rem 0;
    text-align: center;
    background: var(--bg-secondary);
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Media Queries */
@media (max-width: 900px) {
    .about-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .section-title::after {
        left: 20%;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .typewriter-container {
        font-size: 1.2rem;
    }
    
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 70%;
        background: var(--bg-secondary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        border-left: 1px solid var(--accent-cyan);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .hamburger {
        display: flex;
        z-index: 1000;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

@media (hover: none) and (pointer: coarse) {
    /* Disable custom cursor on touch devices */
    * { cursor: auto; }
    .cursor-dot, .cursor-trail { display: none; }
}
