::-moz-selection { 
    color: #000; 
    background: var(--neon-blue); 
}

::selection { 
    color: #000; 
    background: var(--neon-blue); 
}

:root {
    --bg-dark: #0a0a0f;
    --bg-panel: rgba(15, 15, 23, 0.65);
    --neon-blue: #0ff;
    --neon-pink: #f0f;
    --neon-purple: #9d00ff;
    --text-primary: #e0e0f0;
    --text-secondary: #8a8a9f;
    
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    
    --border-glow: 0 0 10px rgba(0, 255, 255, 0.4), inset 0 0 10px rgba(0, 255, 255, 0.2);
}


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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        linear-gradient(rgba(10, 10, 15, 0.9), rgba(10, 10, 15, 0.9)),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 255, 255, 0.03) 2px, rgba(0, 255, 255, 0.03) 4px);
    background-attachment: fixed;
}

section {
    position: relative;
    z-index: 2; /* Ensures cards/content are above the moon (z-1) */
}

/* Add padding to content sections for breathing room */
#experience, #skills, #projects {
    padding: 100px 5%;
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 8px;
}

/* Headings */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    letter-spacing: 2px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--neon-blue);
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.neon-text {
    color: var(--neon-pink);
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

.blink {
    animation: blink 1s step-end infinite;
}

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

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 5%;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 15px 5%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
}

.logo .dot {
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--neon-blue);
    box-shadow: 0 0 8px var(--neon-blue);
    transition: width 0.3s ease;
}

.nav-links a:hover, 
.nav-links a.active {
    color: var(--neon-blue);
}

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

main {
    position: relative;
    z-index: 5;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    position: relative;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.greeting {
    color: var(--neon-blue);
    font-family: var(--font-heading);
    letter-spacing: 3px;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--text-primary);
    position: relative;
}

/* Glitch Effect */
.glitch {
    position: relative;
}
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}
.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--neon-pink);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}
.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--neon-blue);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip: rect(21px, 9999px, 83px, 0); }
  20% { clip: rect(78px, 9999px, 94px, 0); }
  40% { clip: rect(51px, 9999px, 32px, 0); }
  60% { clip: rect(20px, 9999px, 81px, 0); }
  80% { clip: rect(89px, 9999px, 12px, 0); }
  100% { clip: rect(61px, 9999px, 100px, 0); }
}

@keyframes glitch-anim2 {
  0% { clip: rect(65px, 9999px, 10px, 0); }
  20% { clip: rect(10px, 9999px, 56px, 0); }
  40% { clip: rect(49px, 9999px, 81px, 0); }
  60% { clip: rect(2px, 9999px, 19px, 0); }
  80% { clip: rect(72px, 9999px, 41px, 0); }
  100% { clip: rect(98px, 9999px, 8px, 0); }
}

.role {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.summary {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* HUD Style Status Bars for Contact Info */
.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--neon-blue);
    min-width: 65px;
    letter-spacing: 1px;
}

.stat-bar-container {
    flex-grow: 1;
    height: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    max-width: 151px;
}

.stat-bar {
    height: 100%;
    transition: width 1.5s cubic-bezier(0.1, 0.7, 1.0, 0.1);
}

.stat-bar.hp { 
    background: linear-gradient(90deg, #ff0055, #ff4d88); 
    box-shadow: 0 0 10px rgba(255, 0, 85, 0.5);
}

.stat-bar.mp { 
    background: linear-gradient(90deg, #00d4ff, #0ff); 
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.stat-bar.exp { 
    background: linear-gradient(90deg, #9d00ff, #f0f); 
    box-shadow: 0 0 10px rgba(157, 0, 255, 0.5);
}

.stat-value {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    min-width: 200px;
}

.hud-link {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.hud-link:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--neon-blue);
    border-bottom: 1px solid var(--neon-blue);
    opacity: 0.8;
}

/* Buttons */
.cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    color: var(--bg-dark);
    background: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    border: 1px solid var(--neon-blue);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 0; height: 100%;
    background: #fff;
    z-index: -1;
    transition: width 0.3s;
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
    color: var(--bg-dark);
}

.btn-primary:hover::before {
    width: 100%;
}

/* Hero Graphic Animations */
.hero-graphic {
    position: relative;
    width: 500px;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-pic {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    z-index: 3;
    border: 3px solid var(--neon-blue);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.4);
}

.cyber-circle {
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 2px dashed var(--neon-blue);
    animation: rotate 20s linear infinite;
    position: absolute;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.cyber-circle.inner {
    width: 330px;
    height: 330px;
    border: 2px solid var(--neon-pink);
    border-top-color: transparent;
    border-bottom-color: transparent;
    animation: rotate-reverse 10s linear infinite;
}

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

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

.timeline::before {
    content: '';
    position: absolute;
    top: 0; left: 20px;
    width: 2px; height: 100%;
    background: rgba(0, 255, 255, 0.2);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    padding-left: 60px;
    width: 100%;
}

.timeline-dot {
    position: absolute;
    top: 0; left: 14px;
    width: 14px; height: 14px;
    background: var(--neon-blue);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-blue);
    z-index: 2;
}

.timeline-content {
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-content:hover {
    transform: translateY(-10px);
    border-color: var(--neon-blue);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
}

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

.company {
    color: var(--neon-pink);
    font-weight: 600;
    margin-bottom: 1rem;
}

.company span {
    color: var(--text-secondary);
    font-weight: 400;
}

.timeline-content ul {
    list-style-position: inside;
    color: var(--text-secondary);
}
.timeline-content li {
    margin-bottom: 0.5rem;
}

/* Skills Grid & Radar Layout */
.skills-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: center;
    justify-content: center;
}

.skills-grid {
    flex: 1;
    min-width: 300px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.skills-radar-container {
    flex: 0 1 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
}

.skills-radar-container canvas {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.3));
}

.skill-card {
    background: var(--bg-panel);
    border: 1px solid rgba(157, 0, 255, 0.2);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--neon-blue);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
}

.skill-icon {
    font-size: 3rem;
    color: var(--neon-purple);
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    transition: color 0.3s, text-shadow 0.3s;
}

.skill-card:hover .skill-icon {
    color: #fff;
    text-shadow: 0 0 15px var(--neon-purple);
}

.skill-image {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    margin-bottom: 1rem;
    /* Basic glow to fit the theme */
    filter: drop-shadow(0 0 5px var(--neon-purple));
    transition: filter 0.3s, transform 0.3s;
}

.skill-card:hover .skill-image {
    filter: drop-shadow(0 0 15px var(--neon-purple));
    transform: scale(1.1);
}

/* Projects */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 1100px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Override glass-panel blur — looks bad with the image header */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--neon-blue);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
}

.project-info {
    padding: 2rem;
}

.project-info h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1rem;
    transition: color 0.3s;
}

.project-card:hover .project-info h3 {
    color: var(--neon-blue);
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

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

.project-tags span {
    font-size: 0.8rem;
    background: rgba(0, 255, 255, 0.1);
    color: var(--neon-blue);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.view-more {
    color: var(--neon-pink);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.view-more:hover {
    gap: 10px;
    color: #fff;
    text-shadow: 0 0 8px var(--neon-pink);
}

/* Footer & Dino */
footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.dino-container {
    margin-top: 1.5rem;
    position: relative;
    height: 45px;
    width: 100%;
    border-bottom: 2px solid var(--text-secondary);
    opacity: 0.8;
}

.dino {
    position: absolute;
    bottom: -2px; /* Sits perfectly flat on the border line */
    left: -50px;
    height: 40px;
    animation: dinoRun 12s linear infinite;
    will-change: transform;
    transform: translateZ(0); /* Force GPU acceleration */
    backface-visibility: hidden; /* Fixes subpixel edge stuttering */
}

.dino.jumping {
    animation: dinoRun 12s linear infinite, dinoJump 0.3s ease-out;
}

@keyframes dinoRun {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(calc(100vw + 100px), 0, 0); }
}

@keyframes dinoJump {
    0%, 100% { bottom: -2px; }
    50% { bottom: 35px; }
}

/* Stars Background */
.stars {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 200vh;
    z-index: 0; /* Updated z-index to ensure visibility */
    pointer-events: none;
    will-change: transform;
}
.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    /* Apply a static box-shadow. Animating box-shadow on 150 elements kills performance! */
    box-shadow: 0 0 6px var(--neon-blue);
    animation: twinkle 4s infinite alternate;
    will-change: opacity, transform;
    transition: opacity 1.5s;
}
@keyframes twinkle {
    0% { opacity: 0.1; transform: scale(0.7); }
    100% { opacity: 1; transform: scale(1.3); }
}

/* Inline Moon - sits right beside the name in the hero */
.inline-moon {
    position: fixed;
    top: 15%;
    left: 38%;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    box-shadow: inset -30px 10px 0 0px #fff;
    filter: drop-shadow(0 0 20px var(--neon-blue));
    z-index: 1;
    pointer-events: none;
}

/* Moon stays in both modes - it sets as part of the ripple animation */
/* ---------------------------------
   CYBERPUNK FEATURES
--------------------------------- */

@media (pointer: fine) {
    * {
        cursor: none !important;
    }
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10000;
    display: none; /* Shown via JS if pointer is fine */
}

#cursor-dot {
    width: 20px;
    height: 25px;
    background-color: var(--neon-blue);
    clip-path: polygon(0 0, 100% 40%, 60% 60%, 40% 100%);
    filter: drop-shadow(0 0 5px var(--neon-blue));
    transition: width 0.2s, height 0.2s, background-color 0.2s, filter 0.2s;
    /* Small offset so tip is exactly on the pointer hot-spot */
    transform: translate(-1px, -1px); 
}

#cursor-ring {
    width: 30px;
    height: 30px;
    border: 2px solid var(--neon-purple);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--neon-purple);
    transition: width 0.2s, height 0.2s, border-color 0.2s, box-shadow 0.2s;
    /* Centers the ring directly over the cursor tip */
    transform: translate(-50%, -50%); 
}

.cursor-hover #cursor-dot {
    width: 28px;
    height: 35px;
    background-color: var(--neon-pink);
    filter: drop-shadow(0 0 8px var(--neon-pink));
}

.cursor-hover #cursor-ring {
    width: 50px;
    height: 50px;
    border-color: var(--neon-pink);
    box-shadow: 0 0 20px var(--neon-pink);
}

/* Boot Sequence Screen */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    z-index: 9999;
    display: flex;
    padding: 2rem;
    font-family: 'Courier New', Courier, monospace;
    color: #0f0;
    font-size: 1.2rem;
    line-height: 1.5;
    transition: opacity 1s ease-in-out;
}

.boot-text {
    white-space: pre-wrap;
    text-shadow: 0 0 5px #0f0;
}

/* Terminal Section */
.terminal-section {
    max-width: 900px;
    margin: 0 auto;
}

.terminal-window {
    background: rgba(10, 10, 15, 0.9);
    border: 1px solid var(--neon-blue);
    border-radius: 8px;
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.15);
    margin-bottom: 3rem;
}

.terminal-header {
    background: rgba(0, 255, 255, 0.1);
    padding: 10px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--neon-blue);
}

.terminal-header span {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.btn-close { background: #ff5f56; }
.btn-min { background: #ffbd2e; }
.btn-max { background: #27c93f; }

.terminal-title {
    margin-left: 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
}

.terminal-body {
    padding: 20px;
    height: 250px;
    overflow-y: auto;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.6;
}

.terminal-body p {
    margin-bottom: 5px;
}

.terminal-input-line {
    display: flex;
    padding: 0 20px 20px;
    align-items: center;
}

.terminal-input-line .prompt {
    color: #27c93f;
    margin-right: 10px;
}

#terminal-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    outline: none;
    caret-color: var(--neon-blue);
}

.terminal-output-line {
    color: var(--text-secondary);
    margin-bottom: 5px;
}

/* Responsive */
@media (max-width: 900px) {
    .hero { 
        flex-direction: column; 
        justify-content: flex-start; /* Stop centering so items don't push off-screen */
        text-align: center; 
        height: auto;
        min-height: 100vh;
        padding: 130px 5% 100px; /* Large top padding for the header */
    }
    .hero-content { margin-bottom: 3rem; width: 100%; max-width: 100%; }
    .hero-content h1 { font-size: 2.8rem; line-height: 1.2; }
    .hero-stats { margin: 0 auto 3rem; width: 100%; }
    .stat-row { flex-direction: column; gap: 0.5rem; align-items: center; }
    .stat-bar-container { width: 100%; max-width: 200px; margin: 0 auto; }
    .stat-value { min-width: 0; font-size: 0.85rem; }
    .cta-group { justify-content: center; gap: 1rem; }
    .hero-graphic { display: none; }
    .nav-links { display: none; }
    
    /* Make the moon less obtrusive on mobile */
    .inline-moon {
        width: 80px;
        height: 80px;
        top: 10%;
        left: 80%;
        opacity: 0.4;
    }
}
