/* ===========================
   RETRO PORTFOLIO - CSS
   =========================== */

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

:root {
    /* Retro Color Palette */
    --bg-dark: #0a0e27;
    --bg-darker: #050814;
    --primary: #00ff9f;
    --secondary: #ff00ff;
    --accent: #00d4ff;
    --yellow: #ffff00;
    --text-light: #e0e0e0;
    --text-dim: #8892b0;
    --border-color: #00ff9f;
    --card-bg: #1a1f3a;
    --shadow: rgba(0, 255, 159, 0.3);

    /* Fonts */
    --font-pixel: 'Press Start 2P', cursive;
    --font-mono: 'VT323', monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 18px;
}

/* Smooth transitions for all interactive elements */
a,
button,
.skill-tag,
.tech-badge,
.cert-tag,
.exp-tag,
.interest-tag {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Improved card transitions */
.project-card,
.cert-card,
.achievement-card,
.experience-item,
.skill-category {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s ease;
}

/* Emoji Icons Replacement Styles */
.emoji-icon {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    display: inline-block;
    object-fit: contain;
    margin-right: 8px;
}

.intro-overlay .emoji-icon {
    width: 0.8em;
    height: 0.8em;
}

.theme-btn .emoji-icon {
    width: 1.2em;
    height: 1.2em;
    filter: drop-shadow(0 0 2px var(--primary));
}

.sound-toggle .emoji-icon {
    width: 1.2em;
    height: 1.2em;
}

.title-icon .emoji-icon {
    width: 1.2em;
    height: 1.2em;
    margin-right: 0;
}

.nav-menu .emoji-icon {
    width: 0.9em;
    height: 0.9em;
    margin-right: 0;
}

.logo .emoji-icon {
    width: 0.8em;
    height: 0.8em;
    margin-right: 5px;
}

/* ===========================
   TERMINAL INTRO OVERLAY
   =========================== */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: var(--bg-dark);
    transition: opacity 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Terminal Intro Screen */
.terminal-intro {
    width: 90%;
    max-width: 800px;
    z-index: 10001;
    transition: opacity 0.5s;
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow), inset 0 0 20px rgba(0, 0, 0, 0.5);
    animation: crtTurnOn 0.5s ease-out forwards;
    position: relative;
}

@keyframes crtTurnOn {
    0% {
        transform: scale(1, 0.001);
        filter: brightness(10);
        opacity: 0;
    }
    40% {
        transform: scale(1, 0.001);
        filter: brightness(10);
        opacity: 1;
    }
    70% {
        transform: scale(1, 1);
        filter: brightness(1.5);
    }
    100% {
        transform: scale(1, 1);
        filter: brightness(1);
    }
}

.terminal-intro.hidden {
    opacity: 0;
    pointer-events: none;
}

.terminal-intro-header {
    background: var(--bg-darker);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid var(--border-color);
}

.terminal-intro-body {
    padding: 30px;
    font-size: 20px;
    line-height: 1.8;
    min-height: 300px;
    font-family: var(--font-mono);
    color: var(--primary);
    text-shadow: 0 0 5px rgba(0, 255, 159, 0.5);
    display: flex;
    flex-direction: column;
    position: relative;
}



.fast-dump {
    font-size: 14px;
    color: var(--primary);
    opacity: 0.8;
    margin-bottom: 15px;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.2;
}

.loading-bar {
    margin-top: 15px;
    margin-bottom: 20px;
    font-family: var(--font-mono);
    color: var(--accent);
    display: none;
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.5);
}

.loading-bar.active {
    display: block;
}

.typing-line {
    margin-bottom: 10px;
    word-break: break-all;
}

.cursor-blink {
    display: inline-block;
    animation: blink 1s step-end infinite;
}

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



/* Glitch Overlay */
.glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10004;
    pointer-events: none;
    opacity: 0;
}

.glitch-overlay.active {
    animation: glitchScreen 0.3s infinite;
}

@keyframes glitchScreen {
    0% {
        opacity: 0;
        transform: translate(0);
    }

    10% {
        opacity: 1;
        transform: translate(-5px, 5px);
        background: rgba(255, 0, 255, 0.1);
    }

    20% {
        opacity: 1;
        transform: translate(5px, -5px);
        background: rgba(0, 255, 255, 0.1);
    }

    30% {
        opacity: 1;
        transform: translate(-5px, -5px);
        background: rgba(255, 255, 0, 0.1);
    }

    40% {
        opacity: 0;
        transform: translate(0);
    }

    100% {
        opacity: 0;
    }
}

@keyframes glitchError {

    0%,
    90%,
    100% {
        transform: translate(0);
    }

    92% {
        transform: translate(-3px, 3px);
    }

    94% {
        transform: translate(3px, -3px);
    }

    96% {
        transform: translate(-3px, -3px);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Scanline Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.15),
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 2px);
    pointer-events: none;
    z-index: 9999;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===========================
   3D CANVAS BACKGROUND
   =========================== */
#three-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#three-container canvas {
    display: block;
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--bg-darker);
    z-index: 9998;
    border-bottom: 2px solid var(--border-color);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.3s ease;
}

.progress-cat-icon {
    position: absolute;
    top: -15px;
    left: 0%;
    font-size: 35px;
    transition: left 0.3s ease;
    filter: drop-shadow(0 0 10px var(--primary));
}

/* ===========================
   HEADER & NAVIGATION
   =========================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--border-color);
    z-index: 1000;
    padding: 15px 0;
    margin-top: 4px;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-family: var(--font-pixel);
    font-size: 16px;
    color: var(--primary);
    text-shadow: 2px 2px 0 var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo .emoji-icon {
    margin-right: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    font-family: var(--font-pixel);
    font-size: 12px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu a:hover {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* ===========================
   HERO SECTION
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    background:
        linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.glitch-text {
    font-family: var(--font-pixel);
    font-size: clamp(24px, 5vw, 48px);
    color: var(--primary);
    text-shadow:
        2px 2px 0 var(--secondary),
        4px 4px 0 var(--accent);
    margin-bottom: 20px;
    position: relative;
    animation: glitch 3s infinite;
}

@keyframes glitch {

    0%,
    90%,
    100% {
        transform: translate(0);
    }

    92% {
        transform: translate(-2px, 2px);
    }

    94% {
        transform: translate(2px, -2px);
    }

    96% {
        transform: translate(-2px, -2px);
    }
}

.subtitle {
    font-family: var(--font-pixel);
    font-size: clamp(12px, 2vw, 16px);
    color: var(--accent);
    margin-bottom: 30px;
}

.typing-text::after {
    content: '_';
    animation: blink 1s infinite;
}

.hero-description {
    font-size: 24px;
    color: var(--text-dim);
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.btn {
    font-family: var(--font-pixel);
    font-size: 12px;
    padding: 15px 30px;
    text-decoration: none;
    border: 3px solid;
    position: relative;
    transition: all 0.3s;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--shadow);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary);
    box-shadow: 0 0 30px var(--shadow);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

.btn-secondary:hover {
    background: var(--accent);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    transform: translateY(-3px);
}

.hint-box {
    display: inline-block;
    padding: 15px 25px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 18px;
    margin-top: 20px;
}

kbd {
    background: var(--bg-darker);
    padding: 5px 10px;
    border: 2px solid var(--primary);
    border-radius: 3px;
    font-family: var(--font-pixel);
    font-size: 14px;
    color: var(--primary);
    margin: 0 5px;
}

/* ===========================
   SECTIONS
   =========================== */
.section {
    padding: 100px 0;
    position: relative;
}

.section-dark {
    background: var(--bg-darker);
}

.section-title {
    font-family: var(--font-pixel);
    font-size: clamp(20px, 4vw, 32px);
    color: var(--primary);
    margin-bottom: 60px;
    text-align: center;
    text-shadow: 2px 2px 0 var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.title-icon {
    display: inline-block;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ===========================
   ABOUT SECTION
   =========================== */
.terminal-box {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow);
}

.terminal-header {
    background: var(--bg-darker);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid var(--border-color);
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-btn.red {
    background: #ff5f56;
}

.terminal-btn.yellow {
    background: #ffbd2e;
}

.terminal-btn.green {
    background: #27c93f;
}

.terminal-title {
    margin-left: auto;
    font-family: var(--font-pixel);
    font-size: 12px;
    color: var(--text-dim);
}

.terminal-body {
    padding: 30px;
    font-size: 20px;
    line-height: 1.8;
}

.prompt {
    color: var(--primary);
    margin-right: 10px;
}

.terminal-text {
    color: var(--text-light);
    margin: 15px 0;
    margin-left: 30px;
}

/* ===========================
   SKILLS SECTION
   =========================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.skill-category {
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    padding: 30px;
    border-radius: 8px;
    transition: all 0.3s;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
    border-color: var(--accent);
}

.category-title {
    font-family: var(--font-pixel);
    font-size: 16px;
    color: var(--accent);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-title .emoji-icon {
    margin-right: 0;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: var(--bg-darker);
    color: var(--primary);
    padding: 8px 15px;
    border: 2px solid var(--primary);
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s;
}

.skill-tag:hover {
    background: var(--primary);
    color: var(--bg-dark);
    transform: scale(1.05);
}

/* ===========================
   PROJECTS SECTION
   =========================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 159, 0.1), transparent);
    transition: left 0.5s;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--shadow);
    border-color: var(--accent);
}

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

.project-level {
    font-family: var(--font-pixel);
    font-size: 10px;
    background: var(--primary);
    color: var(--bg-dark);
    padding: 5px 10px;
    border-radius: 3px;
}

.project-status {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--accent);
    border: 2px solid var(--accent);
    padding: 5px 10px;
    border-radius: 3px;
}

.project-title {
    font-family: var(--font-pixel);
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-description {
    font-size: 18px;
    color: var(--text-dim);
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tech-badge {
    background: var(--bg-darker);
    color: var(--accent);
    padding: 5px 12px;
    border: 1px solid var(--accent);
    border-radius: 3px;
    font-size: 14px;
}

.project-achievements {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.8;
    border-top: 2px solid var(--border-color);
    padding-top: 15px;
    margin-top: 15px;
}

/* ===========================
   EXPERIENCE SECTION
   =========================== */
.experience-timeline {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.experience-item {
    display: flex;
    gap: 25px;
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    transition: all 0.3s;
}

.experience-item:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 30px var(--shadow);
    border-color: var(--accent);
}

.experience-badge {
    font-size: 40px;
    flex-shrink: 0;
}

.experience-title {
    font-family: var(--font-pixel);
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.experience-company {
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--accent);
    margin-bottom: 12px;
    font-style: italic;
}

.experience-description {
    font-size: 18px;
    color: var(--text-dim);
    margin-bottom: 15px;
    line-height: 1.6;
}

.experience-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.exp-tag {
    background: var(--bg-darker);
    color: var(--accent);
    padding: 5px 12px;
    border: 1px solid var(--accent);
    border-radius: 3px;
    font-size: 14px;
}

/* ===========================
   ACHIEVEMENTS SECTION
   =========================== */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.achievement-card {
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
}

.achievement-card:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 10px 30px var(--shadow);
    border-color: var(--yellow);
}

.achievement-icon {
    font-size: 60px;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

.achievement-card h3 {
    font-family: var(--font-pixel);
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.achievement-card p {
    font-size: 20px;
    color: var(--text-light);
}

.counter {
    font-family: var(--font-pixel);
    font-size: 32px;
    color: var(--accent);
}

/* ===========================
   EDUCATION SECTION
   =========================== */
.education-card {
    max-width: 700px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 8px;
    padding: 40px;
    transition: all 0.3s;
}

.education-card:hover {
    box-shadow: 0 15px 40px var(--shadow);
    border-color: var(--accent);
}

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

.education-header h3 {
    font-family: var(--font-pixel);
    font-size: 18px;
    color: var(--primary);
}

.education-badge {
    font-family: var(--font-pixel);
    font-size: 16px;
    background: var(--primary);
    color: var(--bg-dark);
    padding: 8px 15px;
    border-radius: 5px;
}

.education-institution {
    font-size: 22px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.education-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.highlight-tag {
    background: var(--bg-darker);
    color: var(--accent);
    padding: 8px 15px;
    border: 2px solid var(--accent);
    border-radius: 5px;
    font-size: 16px;
}

/* ===========================
   CONTACT SECTION
   =========================== */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 40px;
}

.contact-info {
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 8px;
    padding: 40px;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 30px;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.contact-item h4 {
    font-family: var(--font-pixel);
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-item a {
    color: var(--accent);
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s;
}

.contact-item a:hover {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
}

.interests-box {
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 8px;
    padding: 40px;
}

.interests-box h3 {
    font-family: var(--font-pixel);
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 25px;
    text-align: center;
}

.interests-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.interest-tag {
    background: var(--bg-darker);
    color: var(--primary);
    padding: 10px 20px;
    border: 2px solid var(--primary);
    border-radius: 5px;
    font-size: 18px;
    transition: all 0.3s;
}

.interest-tag:hover {
    background: var(--primary);
    color: var(--bg-dark);
    transform: scale(1.05);
}

/* ===========================
   FOOTER
   =========================== */
.footer {
    background: var(--bg-darker);
    border-top: 3px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
}

.footer p {
    font-size: 18px;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.heart {
    color: #ff0055;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    10%,
    30% {
        transform: scale(1.1);
    }

    20%,
    40% {
        transform: scale(1);
    }
}

.footer-hint {
    font-family: var(--font-pixel);
    font-size: 12px;
    color: var(--primary);
}

/* ===========================
   PARTICLE CURSOR TRAIL
   =========================== */
#cursor-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9997;
}

/* ===========================
   THEME SWITCHER
   =========================== */
.theme-switcher {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--card-bg);
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
}

.theme-btn {
    width: 50px;
    height: 50px;
    font-size: 24px;
    border: 2px solid var(--border-color);
    background: var(--bg-darker);
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--shadow);
}

.theme-btn.active {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--shadow);
}

/* Theme Variations */
[data-theme="cyberpunk"] {
    --bg-dark: #0d0221;
    --bg-darker: #050111;
    --primary: #ff006e;
    --secondary: #8338ec;
    --accent: #3a86ff;
    --border-color: #ff006e;
    --card-bg: #1a0933;
    --shadow: rgba(255, 0, 110, 0.4);
}

[data-theme="vaporwave"] {
    --bg-dark: #1a0033;
    --bg-darker: #0d001a;
    --primary: #ff71ce;
    --secondary: #01cdfe;
    --accent: #b967ff;
    --border-color: #ff71ce;
    --card-bg: #2d0052;
    --shadow: rgba(255, 113, 206, 0.4);
}

[data-theme="matrix"] {
    --bg-dark: #000000;
    --bg-darker: #001a00;
    --primary: #00ff00;
    --secondary: #00cc00;
    --accent: #00ff66;
    --border-color: #00ff00;
    --card-bg: #003300;
    --shadow: rgba(0, 255, 0, 0.4);
}

[data-theme="gameboy"] {
    --bg-dark: #0f380f;
    --bg-darker: #081808;
    --primary: #9bbc0f;
    --secondary: #8bac0f;
    --accent: #306230;
    --border-color: #9bbc0f;
    --card-bg: #0f380f;
    --shadow: rgba(155, 188, 15, 0.4);
}

/* ===========================
   SOUND TOGGLE
   =========================== */
.sound-toggle {
    position: fixed;
    top: 100px;
    left: 20px;
    z-index: 9999;
    width: 50px;
    height: 50px;
    font-size: 24px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--shadow);
}

/* ===========================
   ACHIEVEMENT NOTIFICATIONS
   =========================== */
#achievement-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.achievement-notification {
    background: var(--card-bg);
    border: 3px solid var(--primary);
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px var(--shadow);
    animation: slideInRight 0.5s ease-out, fadeOut 0.5s ease-in 4.5s;
}

.achievement-icon-notif {
    font-size: 40px;
    animation: bounce 1s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievement-icon-notif .emoji-icon {
    margin-right: 0;
}

.achievement-text h4 {
    font-family: var(--font-pixel);
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 5px;
}

.achievement-text p {
    font-size: 16px;
    color: var(--text-dim);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(400px);
    }
}

/* ===========================
   INTERACTIVE TERMINAL MODAL
   =========================== */
.terminal-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.terminal-modal.active {
    display: flex;
}

.terminal-modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 600px;
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px var(--shadow);
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.terminal-modal-header {
    background: var(--bg-darker);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid var(--border-color);
}

.terminal-modal-header .terminal-btn.red {
    cursor: pointer;
}

.terminal-modal-header .terminal-btn.red:hover {
    transform: scale(1.2);
}

.terminal-modal-body {
    padding: 20px;
    height: 400px;
    overflow-y: auto;
    font-size: 18px;
    line-height: 1.6;
    font-family: var(--font-mono);
}

.terminal-modal-body p {
    margin: 5px 0;
    color: var(--text-light);
}

.terminal-modal-body .error {
    color: #ff5555;
}

.terminal-modal-body .success {
    color: var(--primary);
}

.terminal-input-container {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-darker);
    border-top: 2px solid var(--border-color);
    gap: 10px;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-light);
    font-family: var(--font-mono);
    font-size: 18px;
}

.terminal-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    font-family: var(--font-pixel);
    font-size: 20px;
    border: 3px solid var(--border-color);
    background: var(--card-bg);
    color: var(--primary);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 5px 20px var(--shadow);
}

.terminal-trigger:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px var(--shadow);
}

/* ===========================
   CODING STATS SECTION
   =========================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.stats-platform-card {
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.stats-platform-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow);
    border-color: var(--accent);
}

.platform-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.platform-icon {
    font-size: 32px;
    filter: drop-shadow(0 0 10px var(--primary));
}

.platform-header h3 {
    font-family: var(--font-pixel);
    font-size: 18px;
    color: var(--primary);
}

.stats-content {
    min-height: 150px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 255, 159, 0.2);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 16px;
    color: var(--text-dim);
}

.stat-value {
    font-family: var(--font-pixel);
    font-size: 18px;
    color: var(--primary);
    text-shadow: 0 0 10px var(--shadow);
}

.stat-value.highlight {
    color: var(--accent);
    font-size: 20px;
}

/* Loading State */
.stats-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    gap: 15px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-darker);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.stats-loading p {
    font-size: 16px;
    color: var(--text-dim);
}

/* Error State */
.stats-error {
    text-align: center;
    padding: 20px;
    color: #ff5f56;
    font-size: 16px;
}

.stats-error-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

/* Refresh Button */
.refresh-stats-btn {
    background: var(--card-bg);
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--font-pixel);
    font-size: 12px;
    margin-left: 20px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.refresh-stats-btn:hover {
    background: var(--primary);
    color: var(--bg-dark);
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--shadow);
}

.refresh-stats-btn:active .refresh-icon {
    animation: spin 0.5s ease-in-out;
}

.refresh-icon {
    display: inline-block;
    transition: transform 0.3s;
}

/* Stats Footer */
.stats-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.stats-update-time {
    font-size: 14px;
    color: var(--text-dim);
    font-family: var(--font-pixel);
}

/* Rank Badge Styling */
.rank-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-family: var(--font-pixel);
    font-size: 14px;
    font-weight: bold;
}

.rank-badge.newbie {
    background: #808080;
    color: #000;
}

.rank-badge.pupil {
    background: #008000;
    color: #fff;
}

.rank-badge.specialist {
    background: #03a89e;
    color: #fff;
}

.rank-badge.expert {
    background: #0000ff;
    color: #fff;
}

.rank-badge.candidate-master {
    background: #a0a;
    color: #fff;
}

.rank-badge.master {
    background: #ff8c00;
    color: #fff;
}

.rank-badge.grandmaster {
    background: #ff0000;
    color: #fff;
}

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.blink {
    animation: blink 1s infinite;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 768px) {
    .nav-menu {
        gap: 15px;
    }

    .nav-menu a {
        font-size: 10px;
    }

    .logo {
        font-size: 12px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        margin-bottom: 40px;
    }

    .projects-grid,
    .skills-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .pixel-cat {
        width: 40px;
        height: 40px;
        bottom: 50px;
        left: 20px;
    }

    .experience-item {
        flex-direction: column;
    }

    .terminal-body {
        padding: 20px;
        font-size: 16px;
    }

    .education-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hint-box {
        font-size: 14px;
        padding: 10px 15px;
    }

    kbd {
        font-size: 10px;
        padding: 3px 6px;
    }

    .achievement-icon {
        font-size: 40px;
    }

    .contact-icon {
        font-size: 30px;
    }
}

/* ===========================
   GEEKSFORGEEKS STATS - CARD LAYOUT
   =========================== */
.gfg-stats-container {
    max-width: 900px;
    margin: 0 auto;
}

.gfg-main-title {
    font-family: var(--font-pixel);
    font-size: 20px;
    color: var(--primary);
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 2px 2px 0 var(--secondary);
}

.gfg-card {
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s;
}

.gfg-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
    border-color: var(--accent);
}

.gfg-card-title {
    font-family: var(--font-pixel);
    font-size: 16px;
    color: var(--accent);
    margin-bottom: 20px;
    text-align: center;
}

.gfg-stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.gfg-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--bg-darker);
    border-radius: 5px;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.gfg-stat-row:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

.gfg-stat-label {
    font-family: var(--font-mono);
    font-size: 18px;
    color: var(--text-light);
    font-weight: 500;
}

.gfg-stat-label.easy {
    color: #4ade80;
}

.gfg-stat-label.medium {
    color: #fbbf24;
}

.gfg-stat-label.hard {
    color: #f87171;
}

.gfg-stat-label.codechef {
    color: #4ade80;
}

.gfg-stat-label.codeforces {
    color: #fbbf24;
}

.gfg-stat-number {
    font-family: var(--font-pixel);
    font-size: 18px;
    color: var(--primary);
    font-weight: bold;
}

.gfg-total {
    font-family: var(--font-pixel);
    font-size: 14px;
    color: var(--accent);
    text-align: center;
    padding: 10px;
    background: var(--bg-darker);
    border-radius: 5px;
    border: 2px solid var(--accent);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gfg-stats-container {
        padding: 0 10px;
    }

    .gfg-card {
        padding: 20px;
    }

    .gfg-stat-row {
        padding: 10px 15px;
    }

    .gfg-stat-label,
    .gfg-stat-number {
        font-size: 16px;
    }
}

/* ===========================
   CERTIFICATIONS SECTION
   =========================== */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.cert-card {
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.cert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.cert-card:hover::before {
    transform: scaleX(1);
}

.cert-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--shadow);
    border-color: var(--accent);
}

.cert-badge {
    font-size: 50px;
    margin-bottom: 15px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.cert-title {
    font-family: var(--font-pixel);
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.cert-issuer {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 15px;
    font-weight: 600;
}

.cert-description {
    font-size: 16px;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 20px;
}

.cert-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cert-tag {
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 6px 12px;
    background: var(--bg-darker);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-light);
    transition: all 0.3s;
}

.cert-tag:hover {
    background: var(--primary);
    color: var(--bg);
    border-color: var(--primary);
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .certifications-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cert-card {
        padding: 25px;
    }

    .cert-badge {
        font-size: 40px;
    }

    .cert-title {
        font-size: 16px;
    }
}

/* ===========================
   ENHANCED ANIMATIONS & TRANSITIONS
   =========================== */

/* Fade-in animation for sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Apply fade-in to sections */
.section {
    animation: fadeInUp 0.8s ease-out;
}

/* Stagger animation for grid items */
.project-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.project-card:nth-child(1) {
    animation-delay: 0.1s;
}

.project-card:nth-child(2) {
    animation-delay: 0.2s;
}

.project-card:nth-child(3) {
    animation-delay: 0.3s;
}

.project-card:nth-child(4) {
    animation-delay: 0.4s;
}

.project-card:nth-child(5) {
    animation-delay: 0.5s;
}

.project-card:nth-child(6) {
    animation-delay: 0.6s;
}

.cert-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.cert-card:nth-child(1) {
    animation-delay: 0.1s;
}

.cert-card:nth-child(2) {
    animation-delay: 0.2s;
}

.cert-card:nth-child(3) {
    animation-delay: 0.3s;
}

.achievement-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.achievement-card:nth-child(1) {
    animation-delay: 0.1s;
}

.achievement-card:nth-child(2) {
    animation-delay: 0.2s;
}

.achievement-card:nth-child(3) {
    animation-delay: 0.3s;
}

.achievement-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Enhanced hover effects */
.skill-tag:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px var(--shadow);
}

.tech-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.cert-tag:hover {
    transform: translateY(-2px) scale(1.08);
}

.exp-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px var(--shadow);
}

.interest-tag:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

/* Smooth button transitions */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--shadow);
}

/* Nav menu smooth transitions */
.nav-menu a {
    position: relative;
    transition: color 0.3s ease;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Card glow effect on hover */
.project-card:hover,
.cert-card:hover,
.achievement-card:hover {
    box-shadow: 0 15px 40px var(--shadow),
        0 0 20px rgba(0, 255, 159, 0.2);
}

/* Smooth scale for icons */
.achievement-icon,
.cert-badge,
.experience-badge {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.achievement-card:hover .achievement-icon,
.cert-card:hover .cert-badge,
.experience-item:hover .experience-badge {
    transform: scale(1.15) rotate(5deg);
}

/* Terminal box smooth appearance */
.terminal-box {
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* Section title animation */
.section-title {
    animation: fadeIn 0.6s ease-out;
}

/* Skill category stagger */
.skill-category {
    animation: fadeInUp 0.6s ease-out backwards;
}

.skill-category:nth-child(1) {
    animation-delay: 0.1s;
}

.skill-category:nth-child(2) {
    animation-delay: 0.2s;
}

.skill-category:nth-child(3) {
    animation-delay: 0.3s;
}

.skill-category:nth-child(4) {
    animation-delay: 0.4s;
}

.skill-category:nth-child(5) {
    animation-delay: 0.5s;
}

.skill-category:nth-child(6) {
    animation-delay: 0.6s;
}

/* Experience timeline smooth reveal */
.experience-item {
    animation: fadeInUp 0.7s ease-out backwards;
}

.experience-item:nth-child(1) {
    animation-delay: 0.1s;
}

.experience-item:nth-child(2) {
    animation-delay: 0.3s;
}

/* Contact items animation */
.contact-item {
    animation: fadeInUp 0.6s ease-out backwards;
}

.contact-item:nth-child(1) {
    animation-delay: 0.1s;
}

.contact-item:nth-child(2) {
    animation-delay: 0.2s;
}

.contact-item:nth-child(3) {
    animation-delay: 0.3s;
}

.contact-item:nth-child(4) {
    animation-delay: 0.4s;
}

.contact-item:nth-child(5) {
    animation-delay: 0.5s;
}

.contact-item:nth-child(6) {
    animation-delay: 0.6s;
}

/* ===========================
   ICON MARGIN RESET
   Removes redundant margins for flex containers
   =========================== */
.btn .emoji-icon,
.project-title .emoji-icon,
.experience-title .emoji-icon,
.achievement-card h3 .emoji-icon,
.contact-item h4 .emoji-icon,
.theme-btn .emoji-icon,
.sound-toggle .emoji-icon {
    margin-right: 0;
}