/* Pixel Art Style CSS for Akkhalin P.'s Portfolio */

:root {
    --pixel-font: 'Press Start 2P', cursive;
    --text-font: 'VT323', monospace;
    --bg-color-dark: #070719; 
    --bg-color-light: #16163b; 
    --text-color-light: #00ffcc; 
    --text-color-accent: #ff00ff; 
    --text-color-yellow: #ffff00; 
    --border-color: #ffffff;
    --shadow-color: rgba(0, 255, 255, 0.4);
}

body {
    font-family: var(--text-font);
    background-color: var(--bg-color-dark);
    color: var(--text-color-light);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 1.2rem;
    /* Animated Retro Grid Background */
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: bgScroll 20s linear infinite;
}

@keyframes bgScroll {
    0% { background-position: 0 0; }
    100% { background-position: -40px 40px; }
}

/* CRT Effect Overlay */
.crt::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 999;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

/* Pixel Canvas Background */
#pixel-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.7;
}

.container {
    width: 85%;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1; /* Keep content above canvas */
}

h1, h2, h3 {
    font-family: var(--pixel-font);
    text-transform: uppercase;
    color: var(--text-color-accent);
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 50px 0 20px;
}

.profile-avatar {
    width: 160px;
    height: 160px;
    border: 6px solid var(--border-color);
    image-rendering: pixelated;
    margin-bottom: 20px;
    box-shadow: 8px 8px 0px var(--text-color-accent);
    background-color: #000;
    /* Idle RPG Bobbing Animation */
    animation: idleBob 2s ease-in-out infinite alternate;
}
@keyframes idleBob {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-10px); }
}

.profile-avatar:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 12px 12px 0px var(--text-color-light);
    animation-play-state: paused;
}

/* Glitch Effect for main text */
.glitch {
    position: relative;
    color: white;
    font-size: 2.5em;
    letter-spacing: 2px;
    margin: 10px 0;
    text-shadow: 4px 4px 0px var(--text-color-accent);
}

.blink-text {
    font-family: var(--pixel-font);
    color: var(--text-color-yellow);
    animation: blink 1s step-end infinite;
    font-size: 1.2rem;
    margin-top: 15px;
}

/* Retro UI Windows */
.retro-window {
    background-color: #000;
    border: 4px solid var(--text-color-light);
    padding: 0;
    margin-bottom: 40px;
    box-shadow: 8px 8px 0px var(--text-color-accent);
    image-rendering: pixelated;
}

.window-title-bar {
    background-color: var(--text-color-light);
    color: #000;
    padding: 8px 12px;
    font-family: var(--pixel-font);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    border-bottom: 4px solid #000;
}

.window-title {
    font-weight: bold;
}

.window-controls {
    cursor: pointer;
}

.window-content {
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.6);
}

/* Experience Grid Layout */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

/* Card Style for Items */
.card {
    background-color: var(--bg-color-light);
    border: 4px solid var(--border-color);
    padding: 20px;
    box-shadow: 4px 4px 0px var(--text-color-light);
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    /* Subtle float for cards */
    animation: cardFloat 4s ease-in-out infinite alternate;
    z-index: 2; /* Ensure text is above icon */
}
.card:nth-child(even) {
    animation-delay: -2s;
}
@keyframes cardFloat {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-4px); }
}

.card:hover {
    transform: translate(-4px, -4px) scale(1.02);
    box-shadow: 8px 8px 0px var(--text-color-yellow);
    background-color: #1a1a4a;
    animation-play-state: paused;
}

.card h3 {
    margin-top: 0;
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 15px;
}

.card p {
    margin-bottom: 0;
    flex-grow: 1;
    font-size: 1.1em;
}

.card p, .card h3 {
    position: relative;
    z-index: 2; /* Force text to render above icon */
}

.card-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 2.5em;
    opacity: 0.15; /* Lower opacity to prevent text clashing */
    transition: opacity 0.2s, transform 0.2s;
    z-index: 1; /* Force icon to render below text */
}

.card:hover .card-icon {
    opacity: 0.4;
    transform: scale(1.1);
}

.highlight {
    color: var(--text-color-yellow);
}

/* Links & Buttons */
a {
    color: var(--text-color-accent);
    text-decoration: none;
    border-bottom: 2px dashed var(--text-color-accent);
    transition: color 0.2s, border-color 0.2s;
}

a:hover {
    color: var(--text-color-yellow);
    border-bottom: 2px solid var(--text-color-yellow);
}

.retro-btn {
    display: inline-block;
    background-color: var(--text-color-accent);
    color: #000;
    font-family: var(--pixel-font);
    padding: 10px 15px;
    border: 4px solid var(--border-color);
    box-shadow: 4px 4px 0px #000;
    text-decoration: none;
    margin: 5px 0;
    font-size: 0.8em;
}

.retro-btn:hover {
    background-color: var(--text-color-yellow);
    color: #000;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000;
    border-bottom: 4px solid var(--border-color);
}

.footer {
    text-align: center;
    padding: 20px 0;
    font-family: var(--pixel-font);
    font-size: 0.8em;
    color: #888;
}

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

.blink {
    animation: blink 1s step-end infinite;
}