:root {
    --bg-color: #050505;
    --card-bg: #111111;
    --text-color: #ffffff;
    --text-secondary: #aaaaaa;
    --primary: #00ff9d;
    --secondary: #00b8ff;
    --accent: #ff0055;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-heading);
    overflow-x: hidden;
    cursor: none;
    /* Custom cursor */
}

html {
    scroll-behavior: smooth;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary);
    transition: transform 0.1s;
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(5, 5, 5, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.accent {
    color: var(--primary);
}

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

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: var(--transition);
}

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

/* Sections */
.section {
    padding: 8rem 10%;
}

.section-header {
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    gap: 20px;
}

.section-title {
    font-size: 2rem;
    font-family: var(--font-mono);
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.line {
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--primary), transparent);
}

/* Hero */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 10%;
    position: relative;
}

.sub-heading {
    font-family: var(--font-mono);
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.main-heading {
    font-size: 5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 2rem;
}

.glitch {
    position: relative;
    color: var(--text-color);
}

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

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 var(--accent);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 var(--secondary);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(13px, 9999px, 86px, 0);
    }

    100% {
        clip: rect(66px, 9999px, 15px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(130px, 9999px, 4px, 0);
    }

    100% {
        clip: rect(26px, 9999px, 148px, 0);
    }
}

.description {
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 3rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    z-index: -1;
    transition: var(--transition);
}

.btn:hover {
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
}

.btn:hover::before {
    left: 0;
}

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

.project-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

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

.card-image {
    height: 200px;
    background-color: #222;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--card-bg));
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.tech-stack {
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Skills */
.skills-container {
    max-width: 800px;
}

.skill-item {
    margin-bottom: 2rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
}

.progress-bar {
    height: 4px;
    background: #222;
    border-radius: 2px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    width: 0;
    /* JS will animate this */
    transition: width 1s ease-out;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 1.1rem;
}

/* Gamer Card Redesign */
.about-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-stats-card,
.gamer-stats-card {
    background: #121212;
    /* Darker flat bg for better contrast */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.about-stats-card {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
}

.gamer-stats-card {
    padding: 0;
    /* Let content fill */
    display: flex;
    flex-direction: column;
}

.steam-header {
    padding: 1.5rem;
    background: linear-gradient(to right, #1b2838, #2a475e);
    /* Steam Blue Header */
    display: flex;
    align-items: center;
    gap: 1rem;
}

.steam-avatar-frame {
    position: relative;
}

.steam-avatar-img {
    width: 64px;
    height: 64px;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.steam-user-info h4 {
    color: #fff;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.steam-sub {
    color: #c7d5e0;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    display: block;
    margin-top: 0.2rem;
}

.steam-level-badge {
    display: inline-block;
    border: 2px solid #d95b43;
    /* Steam red border for lvl */
    border-radius: 50%;
    width: 26px;
    height: 26px;
    line-height: 22px;
    text-align: center;
    font-size: 0.8rem;
    color: #fff;
    margin-left: 0.5rem;
    background: #171a21;
}

.favorites-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background: #000;
    /* Gap color */
}

.fav-game {
    position: relative;
    height: 100px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    transition: all 0.3s;
}

.fav-game:first-child {
    grid-column: span 2;
    /* Main game full width */
    height: 140px;
}

.game-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    display: flex;
    flex-direction: column;
}

.game-title {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.game-hours {
    color: var(--primary);
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

.fav-game:hover .game-overlay {
    background: rgba(0, 0, 0, 0.8);
    /* Darken on hover */
}

.stat {
    margin-bottom: 2rem;
}

.stat:last-child {
    margin-bottom: 0;
}

.stat .num {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--secondary);
}

.stat .label {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
footer {
    padding: 5rem 10%;
    text-align: center;
    background: #020202;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.email-btn {
    margin-bottom: 3rem;
}

.socials {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.socials a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: var(--transition);
}

.socials a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    color: #444;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

/* Career Mode */
.career-section {
    padding: 6rem 10%;
}

.career-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    position: relative;
    align-items: flex-start;
}

.column-title {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 2rem;
    font-family: var(--font-mono);
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.stats-column {
    height: 100%;
}

.sticky-wrapper {
    position: sticky;
    top: 100px;
    /* Offset for navbar */
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.skills-container-vertical .skill-item {
    margin-bottom: 2.5rem;
}

/* Timeline updates for 2-col layout */
.timeline-container {
    padding: 2rem 0;
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 2px;
    /* Thinner line for sleek look */
    background: rgba(255, 255, 255, 0.1);
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    transition: height 0.1s linear;
}

.timeline-player {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    font-size: 1.5rem;
    color: var(--primary);
    z-index: 10;
    transition: top 0.1s linear;
    text-shadow: 0 0 15px var(--primary);
}

.timeline-row {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin-bottom: 6rem;
    opacity: 0.3;
    /* Default dim state */
    transition: opacity 0.5s, transform 0.5s;
    transform: translateY(20px);
}

.timeline-row.active {
    opacity: 1;
    transform: translateY(0);
}

.timeline-row .timeline-content {
    width: 45%;
    position: relative;
}

.left-row .timeline-content {
    text-align: right;
}

.right-row .timeline-content {
    text-align: left;
}

.right-row {
    flex-direction: row-reverse;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 20px;
    /* Align with top of card ~ish */
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: var(--bg-color);
    border: 2px solid var(--text-secondary);
    border-radius: 50%;
    z-index: 5;
    transition: all 0.3s;
}

.timeline-row.active .timeline-dot {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary);
    transform: translateX(-50%) scale(1.5);
}

.xp-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.timeline-row.active .xp-card {
    border-color: rgba(0, 255, 157, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.xp-date {
    font-family: var(--font-mono);
    color: var(--primary);
    font-size: 0.8rem;
    display: block;
    margin-bottom: 0.5rem;
}

.xp-role {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
    color: var(--text-color);
}

.xp-company {
    color: var(--secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}

.xp-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {

    /* Timeline Mobile */
    .timeline-line {
        left: 20px;
    }

    .timeline-player {
        left: 20px;
    }

    .timeline-dot {
        left: 20px;
    }

    .timeline-row {
        flex-direction: column;
        padding-left: 50px;
    }

    .right-row {
        flex-direction: column;
    }

    /* Reset from row-reverse */

    .timeline-content {
        width: 100% !important;
        text-align: left !important;
    }

    /* General Mobile */
    .nav-links {
        display: none;
    }

    .main-heading {
        font-size: 3rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* Project Cards Play Overlay */
.card-image {
    position: relative;
    /* Ensure play overlay is positioned correctly */
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
    cursor: pointer;
}

.card-image:hover .play-overlay {
    opacity: 1;
}

.play-btn {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s;
}

.play-btn i {
    color: #fff;
    font-size: 1.5rem;
    margin-left: 5px;
    /* Visual correction for play icon */
}

.card-image:hover .play-btn {
    transform: scale(1.1);
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.video-modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 255, 157, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--primary);
}

.video-frame {
    width: 100%;
    height: 100%;
    border: none;
}