:root {
    --bg-color: #ffffff;
    --grid-color: rgba(0, 0, 0, 0.1);
    --text-main: #111111;
    --text-dim: #555555;
    --neon-pink: #d100d1; /* Darker neon for white bg */
    --neon-cyan: #00a0a0;
    --neon-purple: #6a0dad;
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
    font-weight: 500;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='white' stroke='black' stroke-width='1.5' d='M3 3 L10 20 L13 14 L20 11 Z'/%3E%3C/svg%3E") 0 0, auto;
}

/* Background Grid */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        linear-gradient(transparent 0%, rgba(255, 0, 255, 0.05) 50%, transparent 100%),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px),
        linear-gradient(0deg, var(--grid-color) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    transform: perspective(500px) rotateX(60deg) translateY(100px) translateZ(-200px);
    transform-origin: bottom center;
    z-index: -2;
    animation: grid-move 10s linear infinite;
    pointer-events: none;
}

@keyframes grid-move {
    0% { background-position: 0 0, 0 0, 0 0; }
    100% { background-position: 0 0, 0 40px, 0 40px; }
}

/* Canvas & Overlays */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 100;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.15) 50%
    );
    background-size: 100% 4px;
    z-index: 101;
    pointer-events: none;
    animation: scanline-scroll 10s linear infinite;
    -webkit-mask-image: radial-gradient(circle, transparent 60%, black 100%);
    mask-image: radial-gradient(circle, transparent 60%, black 100%);
}

@keyframes scanline-scroll {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 10;
}

/* Typography & Headers */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    letter-spacing: 2px;
    font-weight: 700;
}

.header {
    text-align: center;
    margin-bottom: 60px;
    border-bottom: 2px solid var(--neon-cyan);
    padding-top: 150px;
    padding-bottom: 30px;
    position: relative;
    box-shadow: 0 10px 20px -10px rgba(0, 255, 255, 0.2);
}

.glitch {
    font-size: 4rem;
    font-weight: 900;
    color: #111;
    position: relative;
    text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan);
    display: inline-block;
    z-index: 2;
}

.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: 1px;
    text-shadow: -1px 0 var(--neon-pink);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

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

@keyframes glitch-anim {
    0% { clip: rect(21px, 9999px, 83px, 0); }
    5% { clip: rect(62px, 9999px, 3px, 0); }
    10% { clip: rect(11px, 9999px, 99px, 0); }
    15% { clip: rect(89px, 9999px, 42px, 0); }
    20% { clip: rect(31px, 9999px, 73px, 0); }
    25% { clip: rect(78px, 9999px, 12px, 0); }
    30% { clip: rect(2px, 9999px, 58px, 0); }
    35% { clip: rect(49px, 9999px, 81px, 0); }
    40% { clip: rect(93px, 9999px, 27px, 0); }
    45% { clip: rect(17px, 9999px, 64px, 0); }
    50% { clip: rect(55px, 9999px, 96px, 0); }
    55% { clip: rect(84px, 9999px, 5px, 0); }
    60% { clip: rect(38px, 9999px, 49px, 0); }
    65% { clip: rect(71px, 9999px, 88px, 0); }
    70% { clip: rect(14px, 9999px, 22px, 0); }
    75% { clip: rect(66px, 9999px, 79px, 0); }
    80% { clip: rect(9px, 9999px, 33px, 0); }
    85% { clip: rect(98px, 9999px, 51px, 0); }
    90% { clip: rect(27px, 9999px, 7px, 0); }
    95% { clip: rect(45px, 9999px, 92px, 0); }
    100% { clip: rect(81px, 9999px, 36px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(91px, 9999px, 13px, 0); }
    5% { clip: rect(42px, 9999px, 63px, 0); }
    10% { clip: rect(71px, 9999px, 9px, 0); }
    15% { clip: rect(29px, 9999px, 82px, 0); }
    20% { clip: rect(81px, 9999px, 33px, 0); }
    25% { clip: rect(18px, 9999px, 52px, 0); }
    30% { clip: rect(62px, 9999px, 8px, 0); }
    35% { clip: rect(9px, 9999px, 91px, 0); }
    40% { clip: rect(53px, 9999px, 17px, 0); }
    45% { clip: rect(87px, 9999px, 44px, 0); }
    50% { clip: rect(35px, 9999px, 76px, 0); }
    55% { clip: rect(14px, 9999px, 95px, 0); }
    60% { clip: rect(68px, 9999px, 29px, 0); }
    65% { clip: rect(41px, 9999px, 88px, 0); }
    70% { clip: rect(74px, 9999px, 12px, 0); }
    75% { clip: rect(26px, 9999px, 69px, 0); }
    80% { clip: rect(99px, 9999px, 23px, 0); }
    85% { clip: rect(8px, 9999px, 51px, 0); }
    90% { clip: rect(57px, 9999px, 7px, 0); }
    95% { clip: rect(85px, 9999px, 92px, 0); }
    100% { clip: rect(31px, 9999px, 36px, 0); }
}

.subtitle {
    color: var(--neon-pink);
    font-size: 1.5rem;
    margin-top: 10px;
    text-transform: uppercase;
    text-shadow: 0 0 5px var(--neon-pink);
}

.contact-info {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    font-family: var(--font-heading);
    font-size: 0.9rem;
}

.contact-info span {
    color: var(--neon-cyan);
}

.contact-info a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}

.contact-info a:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 8px var(--neon-pink);
}

/* Sections */
.section {
    margin-bottom: 50px;
    background: rgba(250, 250, 250, 0.95);
    border: 1px solid rgba(0, 160, 160, 0.4);
    border-left: 4px solid var(--neon-cyan);
    padding: 30px;
    backdrop-filter: blur(5px);
    opacity: 0;
    transform: translateY(30px);
    transition: box-shadow 0.3s, border-color 0.3s;
}

.section.visible {
    animation: glitch-fade-in 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes glitch-fade-in {
    0% {
        opacity: 0;
        transform: translateY(30px) skewX(20deg);
        filter: drop-shadow(-5px 0 0 var(--neon-pink)) drop-shadow(5px 0 0 var(--neon-cyan));
    }
    20% {
        opacity: 0.8;
        transform: translateY(0) skewX(-10deg);
        filter: drop-shadow(5px 0 0 var(--neon-pink)) drop-shadow(-5px 0 0 var(--neon-cyan));
    }
    40% {
        opacity: 0.4;
        transform: translateY(0) skewX(5deg);
        filter: drop-shadow(-2px 0 0 var(--neon-pink)) drop-shadow(2px 0 0 var(--neon-cyan));
    }
    60% {
        opacity: 1;
        transform: translateY(0) skewX(-2deg);
        filter: drop-shadow(2px 0 0 var(--neon-pink)) drop-shadow(-2px 0 0 var(--neon-cyan));
    }
    80% {
        transform: translateY(0) skewX(1deg);
        filter: none;
    }
    100% {
        opacity: 1;
        transform: translateY(0) skewX(0);
        filter: none;
    }
}

.section:hover {
    transform: translateX(5px);
    box-shadow: -5px 0 15px rgba(0, 255, 255, 0.3);
    border-left-color: var(--neon-pink);
}

.section-title {
    color: var(--neon-cyan);
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
    display: inline-block;
}

.section:hover .section-title {
    color: var(--neon-pink);
    text-shadow: 0 0 8px var(--neon-pink);
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid rgba(255, 0, 255, 0.3);
}

.timeline-item {
    margin-bottom: 25px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -27px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--bg-color);
    border: 2px solid var(--neon-pink);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-pink);
}

.timeline-item h4 {
    color: #111;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.timeline-item .role {
    color: var(--text-main);
    font-weight: 700;
}

.timeline-item .date {
    color: var(--neon-cyan);
    font-size: 0.9rem;
    margin-left: 10px;
    font-family: var(--font-heading);
}

.timeline-item .note {
    color: var(--text-dim);
    font-style: italic;
    font-size: 0.9rem;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.skill-category h4 {
    color: var(--neon-pink);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-category li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--neon-cyan);
    font-family: var(--font-heading);
}

.rating {
    color: #fca311;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-shadow: 0 0 5px rgba(252, 163, 17, 0.5);
}

/* Quote Box */
.quote-box {
    text-align: center;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(255, 0, 255, 0.3);
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 0, 255, 0.05),
        rgba(255, 0, 255, 0.05) 10px,
        rgba(0, 0, 0, 0) 10px,
        rgba(0, 0, 0, 0) 20px
    );
}

blockquote {
    font-size: 1.5rem;
    font-style: italic;
    color: #111;
    margin-bottom: 15px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

cite {
    color: var(--neon-cyan);
    font-family: var(--font-heading);
    font-weight: bold;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: var(--text-dim);
    font-family: var(--font-heading);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Profile Image */
.profile-img {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 250px;
    border-radius: 50%;
    border: 3px solid var(--neon-cyan);
    box-shadow: 0 0 25px rgba(0, 160, 160, 0.3);
    object-fit: cover;
    z-index: 1;
    opacity: 0.9;
}

/* Tools System */
.tools-grid-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.tool-group-title {
    color: var(--neon-pink);
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.tool-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
}

.tool-icon, .custom-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #fff;
    border: 2px solid var(--neon-cyan);
    border-radius: 10px;
    color: var(--text-main);
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 5px;
    padding: 10px;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    object-fit: contain;
}

.tool-item:hover .tool-icon, .tool-item:hover .custom-icon {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 160, 160, 0.5);
    border-color: var(--neon-pink);
    color: var(--neon-pink);
}

.tool-item p {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-align: center;
}

/* Footer Quote */
.footer-quote {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
}

.footer-quote blockquote {
    font-size: 1.2rem;
    font-style: italic;
    color: #111;
    margin-bottom: 10px;
}

.footer-quote cite {
    color: var(--neon-cyan);
    font-family: var(--font-heading);
    font-weight: bold;
}

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

.project-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--neon-cyan);
    padding: 20px;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 160, 160, 0.3);
    border-color: var(--neon-pink);
}

.project-card h4 {
    color: var(--neon-pink);
    margin-bottom: 10px;
}

.project-card p {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Interactive Elements */
a, button, .project-card, .tool-item, .contact-info a {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='white' stroke='black' stroke-width='1.5' d='M11 12V3a1.5 1.5 0 0 1 3 0v6l1.5-1.5a1.5 1.5 0 0 1 3 1.5v2a1.5 1.5 0 0 1 3 1.5v4a5.5 5.5 0 0 1-11 0z'/%3E%3C/svg%3E") 6 0, pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }
    
    .glitch {
        font-size: 2.5rem;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 10px;
    }
}
