:root {
    --bg-color: #030305;
    --text-color: #ffffff;
    --neon-primary: #bc13fe;
    --neon-secondary: #04d9ff;
    --glass-bg: rgba(25, 25, 35, 0.2);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* 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(--neon-secondary);
    box-shadow: 0 0 10px var(--neon-secondary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--neon-primary);
    box-shadow: 0 0 15px rgba(188, 19, 254, 0.5) inset, 0 0 15px rgba(188, 19, 254, 0.5);
    transition: width 0.2s, height 0.2s;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--neon-secondary);
    text-shadow: 0 0 10px var(--neon-secondary);
    text-decoration: none;
    z-index: 110;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: rgba(4, 217, 255, 0.08);
    border: 1px solid rgba(4, 217, 255, 0.25);
    border-radius: 8px;
    cursor: pointer;
    z-index: 110;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.nav-toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--neon-secondary);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
    box-shadow: 0 0 6px var(--neon-secondary);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-overlay {
    display: none;
}

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

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s, text-shadow 0.3s;
}

.nav-links a:hover {
    color: var(--neon-primary);
    text-shadow: 0 0 10px var(--neon-primary);
}

/* Sections */
section {
    min-height: 100vh;
    padding: 100px 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Hero Section */
.hero-section {
    align-items: flex-start;
}

.subtitle {
    font-size: 1rem;
    color: var(--neon-secondary);
    letter-spacing: 4px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.highlight-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(4, 217, 255, 0.1);
    border: 1px solid rgba(4, 217, 255, 0.3);
    border-radius: 50px;
    box-shadow: 0 0 10px rgba(4, 217, 255, 0.2);
    text-shadow: 0 0 8px var(--neon-secondary);
}

/* Glitch Effect */
.glitch {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.1;
    position: relative;
    color: white;
    margin-bottom: 2rem;
}

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

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--neon-primary);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--neon-secondary);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 86px, 0); }
    20% { clip: rect(31px, 9999px, 20px, 0); }
    40% { clip: rect(98px, 9999px, 66px, 0); }
    60% { clip: rect(14px, 9999px, 87px, 0); }
    80% { clip: rect(74px, 9999px, 5px, 0); }
    100% { clip: rect(41px, 9999px, 94px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    20% { clip: rect(3px, 9999px, 44px, 0); }
    40% { clip: rect(54px, 9999px, 20px, 0); }
    60% { clip: rect(84px, 9999px, 99px, 0); }
    80% { clip: rect(20px, 9999px, 56px, 0); }
    100% { clip: rect(88px, 9999px, 13px, 0); }
}

.description {
    max-width: 600px;
    font-size: 1.2rem;
    color: #a0a0a0;
    margin-bottom: 3rem;
}

/* Button */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--neon-secondary);
    border: 1px solid var(--neon-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
    box-shadow: 0 0 10px rgba(4, 217, 255, 0.2);
}

.btn:hover {
    background: var(--neon-secondary);
    color: #000;
    border-color: var(--neon-secondary);
    outline: none;
    box-shadow: 0 0 20px var(--neon-secondary), 0 0 40px var(--neon-secondary);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn-secondary {
    border-color: var(--neon-primary);
    color: var(--neon-primary);
    box-shadow: 0 0 10px rgba(188, 19, 254, 0.2);
}

.btn-secondary:hover {
    background: var(--neon-primary);
    color: #000;
    box-shadow: 0 0 20px var(--neon-primary), 0 0 40px var(--neon-primary);
}

.social-sidebar {
    position: fixed;
    top: 50%;
    left: 40px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    z-index: 100;
}

.social-sidebar::before,
.social-sidebar::after {
    content: "";
    display: block;
    width: 2px;
    height: 70px;
    background-color: var(--neon-secondary);
    box-shadow: 0 0 10px var(--neon-secondary);
}

.icon-link {
    color: var(--text-color);
    padding: 0.5rem;
    border: 1px solid transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    background: transparent;
}

.icon-link:hover {
    color: var(--neon-secondary);
    border-color: var(--neon-secondary);
    box-shadow: 0 0 15px rgba(4, 217, 255, 0.4);
    transform: translateY(-5px);
}

/* Section Title */
.section-title {
    font-size: 3rem;
    margin-bottom: 3rem;
    color: var(--neon-primary);
    text-shadow: 0 0 10px rgba(188, 19, 254, 0.5);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.glass-card:hover::before {
    left: 150%;
}

.about-card {
    max-width: 800px;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    width: 100%;
    justify-content: center;
}

.skill-tag {
    padding: 1.5rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-color);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    flex: 1 1 calc(33.333% - 1.5rem);
    min-width: 200px;
}

.skill-tag:hover {
    transform: translateY(-5px);
    border-color: var(--neon-secondary);
    box-shadow: 0 5px 20px rgba(4, 217, 255, 0.2);
    color: var(--neon-secondary);
}

.learning-tag {
    border-color: rgba(188, 19, 254, 0.5);
}

.learning-tag:hover {
    border-color: var(--neon-primary);
    box-shadow: 0 5px 20px rgba(188, 19, 254, 0.2);
    color: var(--neon-primary);
}

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

.project-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--neon-primary);
    box-shadow: 0 10px 30px rgba(188, 19, 254, 0.2);
}

.project-img {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, var(--neon-primary), var(--neon-secondary));
    border-radius: 8px;
    opacity: 0.7;
    transition: 0.3s;
}

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

.project-link {
    color: var(--neon-secondary);
    text-decoration: none;
    font-weight: 600;
    margin-top: auto;
    transition: 0.3s;
}

.project-link:hover {
    color: var(--neon-primary);
    text-shadow: 0 0 8px var(--neon-primary);
}

.contact-subtitle {
    color: #a0a0a0;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    width: 100%;
    align-items: start;
}

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

.contact-info-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.5rem;
    transition: transform 0.3s, border-color 0.3s;
}

.contact-info-card:hover {
    transform: translateX(8px);
    border-color: var(--neon-secondary);
}

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

.contact-info-card h4 {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

.contact-info-card p {
    color: #e0e0e0;
    font-size: 0.95rem;
    margin: 0;
}

.contact-info-card p a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-info-card p a:hover {
    color: var(--neon-secondary);
}

.available {
    color: #00ff88 !important;
    font-size: 0.9rem !important;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.9rem 1.2rem;
    color: var(--text-color);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--neon-secondary);
    box-shadow: 0 0 12px rgba(4, 217, 255, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #555;
}

.form-status {
    padding: 0.9rem 1.2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.form-status--success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.35);
    color: #00ff88;
}

.form-status--error {
    background: rgba(255, 80, 80, 0.1);
    border: 1px solid rgba(255, 80, 80, 0.35);
    color: #ff6b6b;
}

#contact-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive — tablet */
@media (max-width: 1024px) {
    section {
        padding: 90px 6%;
    }

    .glitch {
        font-size: 4.5rem;
    }

    .skill-tag {
        flex: 1 1 calc(50% - 1.5rem);
    }
}

/* Responsive — mobile */
@media (max-width: 768px) {
    * {
        cursor: auto;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
    }

    .social-sidebar {
        display: none;
    }

    .site-nav {
        padding: 1rem 5%;
        background: rgba(3, 3, 5, 0.85);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 99;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s, visibility 0.3s;
    }

    .nav-overlay.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: min(280px, 85vw);
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        padding: 5rem 2rem;
        background: rgba(10, 10, 18, 0.98);
        border-left: 1px solid var(--glass-border);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
        z-index: 100;
        transform: translateX(100%);
        transition: transform 0.35s ease;
    }

    .nav-links.is-open {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 0.5rem 0;
    }

    body.nav-open {
        overflow: hidden;
    }

    section {
        min-height: auto;
        padding: 5.5rem 5% 4rem;
    }

    .hero-section {
        min-height: 100vh;
        min-height: 100dvh;
        padding-top: 6rem;
        justify-content: center;
    }

    .subtitle {
        font-size: 0.75rem;
        letter-spacing: 2px;
        margin-bottom: 1rem;
    }

    .highlight-badge {
        font-size: 0.7rem;
        padding: 0.35rem 0.85rem;
    }

    .glitch {
        font-size: clamp(2.25rem, 11vw, 3.5rem);
        margin-bottom: 1.25rem;
        word-break: break-word;
    }

    .description {
        font-size: 1rem;
        margin-bottom: 2rem;
        line-height: 1.65;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
        padding: 0.9rem 1.5rem;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.75rem;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .about-card {
        max-width: 100%;
    }

    .about-text p {
        font-size: 0.95rem;
    }

    .skill-tag {
        flex: 1 1 100%;
        min-width: 0;
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-img {
        height: 160px;
    }

    .contact-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-info-card {
        padding: 1.25rem;
    }

    .contact-info-card:hover {
        transform: none;
    }

    .contact-info-card p,
    .contact-info-card p a {
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px;
    }
}

/* Responsive — small phones */
@media (max-width: 480px) {
    section {
        padding: 5rem 4% 3.5rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .glitch {
        font-size: clamp(1.85rem, 10vw, 2.75rem);
    }

    .section-title {
        font-size: 1.5rem;
    }

    .contact-info-icon {
        width: 40px;
        height: 40px;
    }

    .contact-info-icon svg {
        width: 20px;
        height: 20px;
    }

    .btn {
        letter-spacing: 1px;
        font-size: 0.85rem;
    }
}

/* Touch devices — no hover slide on contact cards */
@media (hover: none) and (pointer: coarse) {
    .contact-info-card:hover {
        transform: none;
    }

    .project-card:hover {
        transform: none;
    }
}
