:root {
    --bg-color: #0b0c10;
    --grid-color: #1f2833;
    --neon-cyan: #66fcf1;
    --neon-purple: #c5a3ff;
    --neon-pink: #ff007f;
    --text-primary: #ffffff;
    --text-secondary: #c5c6c7;
    --glass-bg: rgba(31, 40, 51, 0.4);
    --glass-border: rgba(102, 252, 241, 0.2);
}

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

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

/* Ensure links are fully clickable and positioned above everything */
a, button, .interactive-link {
    cursor: none;
    position: relative;
    z-index: 100;
    pointer-events: auto;
}

/* Custom Cursor (Hidden on touch devices) */
.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: 6px;
    height: 6px;
    background-color: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 2px solid var(--neon-pink);
    box-shadow: 0 0 15px var(--neon-pink);
    transition: width 0.2s, height 0.2s, border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.cursor-outline.hover {
    width: 50px;
    height: 50px;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px var(--neon-cyan);
    background-color: rgba(102, 252, 241, 0.1);
}

@media (pointer: coarse) {
    body, a, button, .interactive-link {
        cursor: auto;
    }
    .cursor-dot, .cursor-outline {
        display: none !important;
    }
}

/* Scanlines */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.1));
    background-size: 100% 4px;
    z-index: 9998;
    pointer-events: none;
}

/* Space Shooter Background Game */
#bg-game {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background-color: var(--bg-color);
}

/* Typography */
h1, h2, h3, h4, .section-title {
    font-family: 'Press Start 2P', cursive;
    text-transform: uppercase;
}

.glitch {
    font-size: 3rem;
    position: relative;
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--neon-cyan);
    margin-bottom: 10px;
}

.neon-text {
    font-size: 1.2rem;
    color: var(--neon-pink);
    text-shadow: 0 0 5px var(--neon-pink);
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.8rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
    text-align: center;
    margin: 60px 0 40px;
}

/* Layout */
header {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.hero-content {
    background: var(--glass-bg);
    padding: 50px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(102, 252, 241, 0.1);
    width: 100%;
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid var(--neon-cyan);
    box-shadow: 0 0 20px var(--neon-cyan);
    margin-bottom: 30px;
    object-fit: cover;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.contact-info a {
    color: var(--neon-cyan);
    text-decoration: none;
}

.summary {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Glass Cards */
.skills-card, .timeline-content, .project-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 30px;
    backdrop-filter: blur(5px);
    color: var(--text-secondary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.skills-card ul {
    list-style: none;
    line-height: 2;
}

.highlight {
    color: var(--neon-cyan);
    font-weight: 600;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--neon-purple);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    right: -7px;
    background-color: var(--bg-color);
    border: 4px solid var(--neon-pink);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even)::after {
    left: -8px;
}

.timeline-content h4 {
    color: var(--neon-cyan);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.timeline-content h5 {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-family: 'Inter', sans-serif;
}

.timeline-content h5 span {
    color: var(--neon-pink);
}

/* Projects Grid - EXACTLY 3 COLUMNS ON DESKTOP */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-content h4 {
    color: var(--neon-purple);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.project-content p {
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Video Thumbnails */
.video-thumb {
    position: relative;
    display: block;
    border-radius: 10px;
    overflow: hidden;
    margin-top: auto;
    border: 1px solid var(--glass-border);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 15px;
}

.video-thumb img {
    width: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 16/9;
}

.video-thumb .play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 127, 0.8); /* Neon pink */
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    box-shadow: 0 0 15px var(--neon-pink);
    transition: all 0.3s;
}

.video-thumb:hover {
    box-shadow: 0 0 20px var(--neon-cyan);
    border-color: var(--neon-cyan);
}

.video-thumb:hover .play-btn {
    background: var(--neon-cyan);
    box-shadow: 0 0 20px var(--neon-cyan);
    transform: translate(-50%, -50%) scale(1.1);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: transparent;
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    text-decoration: none;
    text-transform: uppercase;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: auto;
    z-index: 100;
}

.btn:hover {
    background: var(--neon-cyan);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--neon-cyan);
}

footer {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    margin-top: 50px;
}

/* 3D Tilt container setup */
.tilt-container {
    animation: float 6s ease-in-out infinite;
}

.tilt-container:nth-child(even) {
    animation-delay: -3s;
}

.tilt-container:nth-child(3n) {
    animation-delay: -1.5s;
}

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

.tilt-element {
    transition: transform 0.1s;
}

/* Fix for Safari/mobile clicking issues with 3D transforms */
.tilt-element > * {
    /* Removed translateZ(30px) because it breaks click hit-testing on desktop browsers */
}

/* Responsive */
@media screen and (max-width: 900px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .timeline::after { left: 20px; }
    .timeline-item { width: 100%; padding-left: 50px; padding-right: 15px; }
    .timeline-item:nth-child(even) { left: 0%; }
    .timeline-item::after { left: 13px; }
    .timeline-item:nth-child(even)::after { left: 13px; }
    
    .glitch { font-size: 1.5rem; word-break: break-word; }
    .neon-text { font-size: 0.9rem; }
    .section-title { font-size: 1.3rem; }
    
    .hero-content { padding: 20px; box-sizing: border-box; }
    .avatar { width: 120px; height: 120px; }
    
    .contact-info { flex-direction: column; gap: 5px; }
    
    .skills-card, .timeline-content, .project-content { padding: 20px; }
    
    .projects-grid { grid-template-columns: 1fr; }
    
    .tilt-element { transform: none !important; }
    .tilt-element > * { transform: none !important; }
    .tilt-container { animation: none; transform-style: flat; perspective: none; }
}
