/* Game-themed Resume Styles */
:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166d3b;
    --accent-color: #f7b32b;
    --background-color: #1a1a2e;
    --text-color: #e6e6e6;
    --level-bg: rgba(26, 26, 46, 0.9);
    --car-blue: #0047AB; /* Subaru WRX Blue */
}

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

body {
    font-family: 'Press Start 2P', 'Courier New', monospace;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="%231a1a2e"/><path d="M0 10L100 10M0 30L100 30M0 50L100 50M0 70L100 70M0 90L100 90M10 0L10 100M30 0L30 100M50 0L50 100M70 0L70 100M90 0L90 100" stroke="%23333355" stroke-width="1"/></svg>');
}

.game-container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border: 3px solid var(--accent-color);
}

.game-header {
    background-color: var(--primary-color);
    padding: 20px;
    text-align: center;
    border-bottom: 3px solid var(--accent-color);
}

.game-header h1 {
    font-size: 24px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0 #000;
}

.level-indicator {
    font-size: 16px;
    margin-bottom: 10px;
}

.progress-bar {
    height: 20px;
    background-color: #333;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--accent-color);
}

.progress {
    height: 100%;
    background-color: var(--secondary-color);
    width: 16.6%; /* 1/6 for level 1 */
    transition: width 0.5s ease-in-out;
}

.game-world {
    position: relative;
    min-height: 500px;
    background-color: var(--background-color);
    overflow: hidden;
}

.level {
    display: none;
    padding: 30px;
    position: relative;
    min-height: 500px;
    animation: fadeIn 0.5s ease;
}

.level.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.level h2 {
    margin-bottom: 20px;
    color: var(--accent-color);
    text-shadow: 2px 2px 0 #000;
}

/* WRX Car Character */
.character {
    position: absolute;
    width: 80px;
    height: 40px;
    bottom: 20px;
    left: 50px;
    z-index: 10;
    transition: transform 0.2s ease;
}

/* Car body */
.car-body {
    position: absolute;
    width: 80px;
    height: 20px;
    background-color: var(--car-blue);
    border-radius: 5px;
    bottom: 0;
    left: 0;
}

/* Car roof */
.car-roof {
    position: absolute;
    width: 40px;
    height: 15px;
    background-color: var(--car-blue);
    border-radius: 5px 5px 0 0;
    bottom: 20px;
    left: 20px;
}

/* Car windows */
.car-windows {
    position: absolute;
    width: 36px;
    height: 12px;
    background-color: #add8e6;
    border-radius: 3px 3px 0 0;
    bottom: 21px;
    left: 22px;
}

/* Car wheels */
.wheel {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #333;
    border-radius: 50%;
    bottom: -8px;
}

.wheel.front {
    left: 60px;
}

.wheel.back {
    left: 10px;
}

/* Wheel rims */
.wheel::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #999;
    border-radius: 50%;
    top: 4px;
    left: 4px;
}

/* Car headlights */
.headlight {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: #fff;
    border-radius: 50%;
    bottom: 10px;
}

.headlight.left {
    left: 2px;
}

.headlight.right {
    left: 72px;
}

/* Car taillights */
.taillight {
    position: absolute;
    width: 6px;
    height: 3px;
    background-color: #ff0000;
    border-radius: 1px;
    bottom: 10px;
}

.taillight.left {
    left: 2px;
}

.taillight.right {
    left: 72px;
}

/* WRX Spoiler */
.spoiler {
    position: absolute;
    width: 20px;
    height: 5px;
    background-color: #333;
    bottom: 20px;
    left: 60px;
}

/* Car direction */
.character.facing-left {
    transform: scaleX(-1);
}

/* Car animations */
.character.accelerating .wheel {
    animation: spin 0.2s linear infinite;
}

.character.fast-driving .wheel {
    animation: spin 0.1s linear infinite;
}

.character.braking::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 5px;
    background-color: rgba(255, 0, 0, 0.7);
    bottom: -5px;
    left: 30px;
    border-radius: 2px;
}

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

/* Exhaust smoke */
.exhaust {
    position: absolute;
    font-size: 16px;
    color: #aaa;
    bottom: 5px;
    left: 0;
    opacity: 0;
}

.character.accelerating .exhaust {
    animation: puff 0.5s infinite;
}

.character.fast-driving .exhaust {
    animation: puff 0.2s infinite;
}

@keyframes puff {
    0% { opacity: 0; transform: translateX(-5px); }
    50% { opacity: 0.8; transform: translateX(-10px); }
    100% { opacity: 0; transform: translateX(-15px); }
}

/* Content area with scrolling */
.content-container {
    position: relative;
    height: 350px;
    overflow: hidden;
    margin-left: 100px;
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    background-color: var(--level-bg);
}

.content {
    padding: 20px;
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none; /* Hide default scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide default scrollbar for IE and Edge */
}

/* Hide default scrollbar for Chrome, Safari and Opera */
.content::-webkit-scrollbar {
    display: none;
}

/* Custom scrollbar */
.custom-scrollbar {
    position: absolute;
    width: 30px;
    height: 100%;
    right: 0;
    top: 0;
    background-color: rgba(0, 0, 0, 0.3);
    border-left: 1px solid var(--accent-color);
}

.scroll-track {
    position: absolute;
    width: 4px;
    height: calc(100% - 60px);
    background-color: #555;
    left: 13px;
    top: 30px;
}

.scroll-handle {
    position: absolute;
    width: 30px;
    height: 50px;
    left: 0;
    background-color: transparent;
    cursor: pointer;
}

/* Stick figure for scrollbar */
.stick-figure {
    position: absolute;
    width: 20px;
    height: 30px;
    left: 5px;
    top: 10px;
}

.stick-head {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 50%;
    top: 0;
    left: 5px;
}

.stick-body {
    position: absolute;
    width: 2px;
    height: 15px;
    background-color: var(--accent-color);
    top: 10px;
    left: 9px;
}

.stick-arm {
    position: absolute;
    width: 10px;
    height: 2px;
    background-color: var(--accent-color);
    top: 15px;
}

.stick-arm.left {
    left: 0;
    transform-origin: right center;
}

.stick-arm.right {
    left: 10px;
    transform-origin: left center;
}

.stick-leg {
    position: absolute;
    width: 2px;
    height: 10px;
    background-color: var(--accent-color);
    top: 25px;
}

.stick-leg.left {
    left: 6px;
    transform-origin: top center;
}

.stick-leg.right {
    left: 12px;
    transform-origin: top center;
}

/* Stick figure animations */
.stick-figure.pulling .stick-arm.left,
.stick-figure.pulling .stick-arm.right {
    animation: pull 0.5s infinite alternate;
}

.stick-figure.pushing .stick-arm.left,
.stick-figure.pushing .stick-arm.right {
    animation: push 0.5s infinite alternate;
}

.stick-figure.waving .stick-arm.right {
    animation: wave 1s infinite;
}

@keyframes pull {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-45deg); }
}

@keyframes push {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(45deg); }
}

@keyframes wave {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(45deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(45deg); }
    100% { transform: rotate(0deg); }
}

.content h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
}

.content p {
    margin-bottom: 15px;
    font-size: 14px;
}

.article-list {
    list-style-type: none;
    padding: 0;
}

.article-item {
    margin-bottom: 0.8rem;
    padding: 0.6rem;
    border-left: 3px solid #3498db;
    background-color: rgba(52, 152, 219, 0.05);
    transition: transform 0.2s ease-in-out;
}

.article-item:hover {
    transform: translateX(5px);
}

.article-item a {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
    display: block;
}

.content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.content li {
    margin-bottom: 5px;
    font-size: 14px;
}

.section {
    margin-bottom: 20px;
}

.job-title {
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 5px;
}

.job-period {
    font-style: italic;
    color: #aaa;
    margin-bottom: 10px;
}

.cta {
    margin-top: 20px;
    padding: 10px;
    background-color: var(--primary-color);
    text-align: center;
    border-radius: 5px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.game-controls {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    background-color: var(--primary-color);
}

.control-btn {
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: 14px;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background-color: var(--accent-color);
    transform: scale(1.05);
}

.experience-item, .education-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--primary-color);
}

.experience-item h4, .education-item h4 {
    color: var(--accent-color);
    margin-bottom: 5px;
}

.date {
    font-style: italic;
    margin-bottom: 10px;
    color: #aaa;
}

.experience-item ul {
    padding-left: 20px;
}

.experience-item li {
    margin-bottom: 5px;
}

.skills-container {
    display: block;
}

.skill-category {
    margin-bottom: 30px;
}

.skill-category h4 {
    margin-bottom: 10px;
    color: var(--accent-color);
}

.skill-item {
    margin-bottom: 10px;
}

.skill-bar {
    height: 15px;
    background-color: #333;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 5px;
}

.skill-level {
    height: 100%;
    background-color: var(--secondary-color);
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Controls hint */
.controls-hint {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--accent-color);
    font-size: 12px;
}

/* Road */
.road {
    position: absolute;
    height: 10px;
    background-color: #333;
    bottom: 10px;
    left: 0;
    right: 0;
    z-index: 1;
}

.road::after {
    content: "";
    position: absolute;
    height: 2px;
    background-color: #fff;
    top: 4px;
    left: 0;
    right: 0;
    background-image: linear-gradient(to right, #fff 50%, transparent 50%);
    background-size: 20px 100%;
}

/* Scroll controls hint */
.scroll-controls-hint {
    position: absolute;
    bottom: 10px;
    right: 40px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 5px;
    border-radius: 5px;
    border: 1px solid var(--accent-color);
    font-size: 10px;
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .content-container {
        margin-left: 0;
        margin-top: 80px;
    }
    
    .character {
        left: 20px;
        top: 80px;
    }
}

/* Car transition animation */
.character.transitioning {
  animation: car-jump 0.5s ease-in-out;
  z-index: 100; /* Ensure the jumping car is visible above everything */
}

@keyframes car-jump {
  0% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-20px) rotate(-5deg); }
  50% { transform: translateY(-30px) rotate(0deg); }
  75% { transform: translateY(-20px) rotate(5deg); }
  100% { transform: translateY(0) rotate(0deg); }
}
