/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(180deg, #0a0e27 0%, #1a0033 100%);
    color: #e0e0ff;
    min-height: 100vh;
    overflow-x: hidden;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><text y="16" font-size="16">✨</text></svg>'), auto;
}

/* Animated starfield background */
.stars, .twinkling {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

.stars {
    background: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==') repeat top center;
    z-index: -2;
    animation: move-twink-back 200s linear infinite;
}

.twinkling {
    background: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==') repeat top center;
    z-index: -1;
    animation: move-twink-back 100s linear infinite;
    opacity: 0.3;
}

@keyframes move-twink-back {
    from { background-position: 0 0; }
    to { background-position: -10000px 5000px; }
}

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

/* ASCII Art Header */
.ascii-art {
    color: #00ffcc;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #00ffcc;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 10px #00ffcc; }
    to { text-shadow: 0 0 20px #00ffcc, 0 0 30px #00ffcc; }
}

/* Glitch Effect */
.glitch {
    font-size: 4rem;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    position: relative;
    color: #ff00ff;
    letter-spacing: 5px;
    animation: glitch-skew 1s infinite linear alternate-reverse;
}

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

.glitch::before {
    animation: glitch-1 0.5s infinite linear alternate-reverse;
    color: #00ffff;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.3s infinite linear alternate-reverse;
    color: #ff00ff;
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(20% 0 30% 0); transform: translate(-2px, 2px); }
    40% { clip-path: inset(50% 0 20% 0); transform: translate(2px, -2px); }
    60% { clip-path: inset(10% 0 60% 0); transform: translate(-2px, 1px); }
    80% { clip-path: inset(80% 0 5% 0); transform: translate(1px, -1px); }
}

@keyframes glitch-2 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
    40% { clip-path: inset(5% 0 80% 0); transform: translate(-2px, 2px); }
    60% { clip-path: inset(40% 0 40% 0); transform: translate(1px, -2px); }
    80% { clip-path: inset(10% 0 70% 0); transform: translate(-1px, 1px); }
}

@keyframes glitch-skew {
    0%, 100% { transform: skew(0deg); }
    20% { transform: skew(1deg); }
    40% { transform: skew(-1deg); }
    60% { transform: skew(0.5deg); }
    80% { transform: skew(-0.5deg); }
}

/* Navigation */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.nav-link {
    color: #ffff00;
    text-decoration: none;
    font-size: 18px;
    padding: 10px 20px;
    border: 2px solid #ffff00;
    background: rgba(255, 255, 0, 0.1);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
}

.nav-link:hover {
    background: #ffff00;
    color: #000;
    box-shadow: 0 0 20px #ffff00;
    transform: scale(1.1);
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -100%;
    width: 100%;
    height: 2px;
    background: white;
    transition: left 0.3s;
}

.nav-link:hover::before {
    left: 100%;
}

/* Sections */
.section {
    margin: 60px 0;
    padding: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid;
    border-image: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00) 1;
    backdrop-filter: blur(10px);
}

/* Marquee */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    background: linear-gradient(90deg, #ff00ff, #00ffff, #ffff00);
    padding: 10px 0;
    margin: 20px 0;
}

.marquee {
    display: inline-block;
    animation: marquee 20s linear infinite;
}

.marquee span {
    padding: 0 50px;
    font-weight: bold;
    color: #000;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Intro Box */
.intro-box {
    text-align: center;
    padding: 40px;
    margin: 30px 0;
    position: relative;
}

.rainbow-border {
    background: linear-gradient(45deg, #ff0080, #ff8c00, #ffd700, #00ff00, #00ffff, #ff00ff);
    background-size: 200% 200%;
    animation: rainbow 3s linear infinite;
    padding: 3px;
}

.rainbow-border::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    background: #0a0e27;
    z-index: -1;
}

@keyframes rainbow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    white-space: nowrap;
    margin: 20px auto;
    letter-spacing: 2px;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
    border-right: 3px solid #00ff00;
    display: inline-block;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #00ff00; }
}

/* Pixel Avatar */
.pixel-avatar {
    width: 100px;
    height: 100px;
    margin: 20px auto;
    background: linear-gradient(to bottom,
        #ffd700 0%, #ffd700 20%,
        #ffc0cb 20%, #ffc0cb 60%,
        #4169e1 60%, #4169e1 80%,
        #333 80%, #333 100%);
    image-rendering: pixelated;
    border: 3px solid #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    animation: float 3s ease-in-out infinite;
}

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

/* Stats Bar */
.stats-bar {
    margin: 30px 0;
}

.stat-item {
    margin: 15px 0;
}

.stat-label {
    color: #00ff00;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.progress-bar {
    background: #333;
    height: 20px;
    border: 2px solid #00ff00;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #00ffff);
    animation: progress-animation 2s ease-out forwards;
    box-shadow: 0 0 10px #00ff00;
}

@keyframes progress-animation {
    from { width: 0; }
}

/* Windows 98 Style */
.window-98 {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #fff #000 #000 #fff;
    box-shadow: 2px 2px 0 #000;
    margin: 30px 0;
}

.window-header {
    background: linear-gradient(90deg, #000080, #1084d0);
    color: white;
    padding: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.window-controls span {
    padding: 0 5px;
    cursor: pointer;
}

.window-content {
    padding: 20px;
    background: #fff;
    color: #000;
}

.window-content h3, .window-content h4 {
    color: #000080;
    margin: 15px 0;
}

/* Custom List */
.custom-list {
    list-style: none;
    padding-left: 20px;
}

.custom-list li::before {
    content: "▸ ";
    color: #ff00ff;
    font-weight: bold;
}

/* Skill Tags */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.tag {
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    color: #000;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

.project-card {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ffff;
    padding: 25px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover::before {
    opacity: 1;
    animation: rotate-border 3s linear infinite;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.5);
}

@keyframes rotate-border {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.project-number {
    font-size: 2rem;
    color: #ff00ff;
    font-weight: bold;
}

.project-icon {
    font-size: 2rem;
}

.project-tags {
    display: flex;
    gap: 5px;
    margin: 15px 0;
}

.mini-tag {
    background: rgba(0, 255, 255, 0.2);
    color: #00ffff;
    padding: 3px 8px;
    font-size: 12px;
    border: 1px solid #00ffff;
}

/* Cyber Button */
.cyber-button {
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    color: #000;
    border: none;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
}

.cyber-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.cyber-button:hover::before {
    width: 300px;
    height: 300px;
}

.cyber-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

/* Process Timeline */
.process-timeline {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    margin: 40px 0;
}

.process-step {
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

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

.process-arrow {
    font-size: 2rem;
    color: #ffff00;
    animation: arrow-move 1s infinite;
}

@keyframes arrow-move {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

/* Section Title */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #00ffff;
    margin-bottom: 30px;
    position: relative;
}

.sparkle {
    display: inline-block;
    animation: sparkle 1s infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
}

/* Contact Section */
.contact-container {
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #ffff00;
    transition: all 0.3s;
}

.social-link .icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.social-link:hover {
    transform: scale(1.2) rotate(5deg);
    color: #00ffff;
}

/* Guestbook */
.guestbook {
    max-width: 600px;
    margin: 40px auto;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffff00;
    padding: 20px;
}

.guestbook h3 {
    color: #ffff00;
    margin-bottom: 20px;
}

.guestbook-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.guestbook-form input,
.guestbook-form textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #ffff00;
    color: #fff;
    padding: 10px;
    font-family: 'Courier New', monospace;
}

.guestbook-form input::placeholder,
.guestbook-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.guestbook-entries {
    max-height: 300px;
    overflow-y: auto;
}

.guestbook-entry {
    background: rgba(255, 255, 0, 0.1);
    border-left: 3px solid #ffff00;
    padding: 10px;
    margin: 10px 0;
    animation: slideIn 0.5s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.guestbook-entry .entry-name {
    color: #00ffff;
    font-weight: bold;
}

.guestbook-entry .entry-date {
    color: #888;
    font-size: 12px;
}

/* Footer */
footer {
    margin-top: 60px;
    padding: 40px 0;
    background: rgba(0, 0, 0, 0.8);
    border-top: 2px solid;
    border-image: linear-gradient(90deg, #ff00ff, #00ffff, #ffff00) 1;
}

.footer-content {
    text-align: center;
}

.webring {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    color: #00ff00;
}

.webring span {
    cursor: pointer;
    transition: all 0.3s;
}

.webring span:hover {
    color: #ffff00;
    transform: scale(1.1);
}

.visitor-counter {
    margin: 20px 0;
    font-size: 1.2rem;
    color: #00ffff;
}

#visitor-count {
    font-weight: bold;
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
}

.copyright {
    margin: 20px 0;
    color: #888;
}

.badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.badge {
    width: 88px;
    height: 31px;
    background: linear-gradient(45deg, #666, #999);
    border: 1px solid #fff;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.badge:hover {
    opacity: 1;
}

/* Cursor Trail */
.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffff00, transparent);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.5s;
}

/* Responsive Design */
@media (max-width: 768px) {
    .glitch {
        font-size: 2rem;
    }
    
    .main-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .process-timeline {
        flex-direction: column;
    }
    
    .process-arrow {
        transform: rotate(90deg);
        margin: 10px 0;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #1a0033;
    border: 1px solid #00ffff;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff00ff, #00ffff);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00ffff, #ff00ff);
}

/* Loading Animation */
@keyframes loading {
    0% { content: 'Loading.'; }
    33% { content: 'Loading..'; }
    66% { content: 'Loading...'; }
    100% { content: 'Loading.'; }
}

/* Selection Styling */
::selection {
    background: #ff00ff;
    color: #000;
}

::-moz-selection {
    background: #ff00ff;
    color: #000;
}