:root {
    --bg: #0a0a0a;
    --accent: #ff5505;
    --text: #ffffff;
    
    /* AI Effect Config */
    --border-width: 1.5;
    --effect-bg: rgba(10, 10, 10, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Stylized Arrow Cursor */
    cursor: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 3L10.07 19.97L12.58 12.58L19.97 10.07L3 3Z' fill='%23ffffff' stroke='%230a0a0a' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 2 2, auto;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.content {
    position: relative;
    z-index: 2;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    perspective: 2000px; /* Global perspective for children */
}

/* Glitch Text */
.glitch-text {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
    position: relative;
    color: var(--text);
    text-shadow: 2px 2px var(--accent);
}

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

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

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

@keyframes glitch-anim {
    0% { clip: rect(30px, 9999px, 10px, 0); }
    5% { clip: rect(80px, 9999px, 90px, 0); }
    10% { clip: rect(40px, 9999px, 20px, 0); }
    15% { clip: rect(10px, 9999px, 60px, 0); }
    20% { clip: rect(50px, 9999px, 30px, 0); }
    100% { clip: rect(60px, 9999px, 70px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(10px, 9999px, 80px, 0); }
    5% { clip: rect(60px, 9999px, 10px, 0); }
    10% { clip: rect(90px, 9999px, 20px, 0); }
    15% { clip: rect(20px, 9999px, 50px, 0); }
    20% { clip: rect(70px, 9999px, 40px, 0); }
    100% { clip: rect(30px, 9999px, 90px, 0); }
}

.subtitle {
    font-size: 1rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-bottom: 3rem;
}

/* Tilt Wrappers */
.tilt-wrapper {
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
    will-change: transform;
    z-index: 10;
}

/* Contact Card */
.contact-container {
    margin-top: 1rem;
}

.card {
    width: 280px;
    height: 70px;
    position: relative;
    transform-style: preserve-3d;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

/* AI Effect Container */
.ai-effect {
    position: relative;
    background: var(--effect-bg);
    border-radius: 16px;
    /* No overflow hidden here to allow border glow to bleed if we want, 
       but we need it for internal masking. Let's use a child for border. */
    overflow: visible; 
}

/* The Glow Border (Pseudo-element) */
.border-gradient {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: calc(var(--border-width) * 1px);
    background: linear-gradient(to bottom, rgba(255,255,255,0.4), rgba(255,255,255,0.05));
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    filter: url(#blur) brightness(2);
    opacity: 0.8;
    transition: opacity 0.3s;
}

/* Internal Glow Tracking */
.glow-container {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(
        600px circle at calc(var(--pointer-x, 0.5) * 100%) calc(var(--pointer-y, 0.5) * 100%), 
        rgba(255, 255, 255, 0.15) 0%, 
        transparent 40%
    );
    opacity: 0.6;
    mix-blend-mode: overlay;
    z-index: 1;
}

/* Card Faces */
.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.05);
}

.card-back {
    transform: rotateY(180deg);
    background: rgba(5, 5, 5, 0.9);
}

.contact-button {
    background: transparent;
    border: none;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.email-link {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    z-index: 2;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 2rem;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 20;
    pointer-events: none;
    perspective: 1000px;
}

.footer-container {
    pointer-events: auto;
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.footer-container p {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    margin: 0;
    z-index: 2;
}

/* Utilities */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

@media (max-width: 600px) {
    .glitch-text {
        font-size: 3rem;
    }
    
    .card {
        width: 260px;
    }
}
