/* ==================== */
/* RETRO FUTURISTIC PORTFOLIO */
/* ==================== */

/* Global Variables */
:root {
    /* Base Colors */
    --retro-black: #000000;
    --retro-dark: #191919;
    --retro-gray: #252535;
    --retro-light-gray: #d3e1f2;
    --retro-white: #fafcff;
    
    /* Neon Colors */
    --retro-green: #04e410;
    --retro-cyan: #00ffff;
    --retro-blue: #0066ff;
    --retro-purple: #9c04e4;
    --retro-pink: #ff00aa;
    --retro-red: #ff0033;
    --retro-yellow: #ffff00;
    --retro-orange: #ff6600;
    
    /* Medal Colors */
    --gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
    
    /* Effects */
    --glow: 0 0 10px currentColor;
    --long-glow: 0 0 20px currentColor;
}

/* ==================== */
/* BASE STYLES */
/* ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background-color: var(--retro-black);
    color: var(--retro-white);
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==================== */
/* CRT SCREEN EFFECTS */
/* ==================== */

/*.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(18, 16, 16, 0.1) 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));
    background-size: 100% 3px, 4px 100%;
    pointer-events: none;
    z-index: 9999;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 50%,
        transparent 100%
    );
    background-size: 100% 6px;
    animation: scanline 6s linear infinite;
    pointer-events: none;
    z-index: 9998;
}

@keyframes scanline {
    from { background-position: 0 0; }
    to { background-position: 0 100%; }
}

/* ==================== */
/* TYPOGRAPHY & ANIMATIONS */
/* ==================== */

.retro-type {
    overflow: hidden;
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 1px;
}

.blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

/* ==================== */
/* LAYOUT COMPONENTS */
/* ==================== */

/* Header */
.retro-header {
    background-color: var(--retro-black);
    border-bottom: 2px solid var(--retro-light-gray);
    padding: 10px 20px;
    position: relative;
    z-index: 100;
}

.terminal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.terminal-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: var(--retro-black);
}

.control.red { background-color: cyan; }
.control.yellow { background-color: var(--retro-yellow); }
.control.green { background-color: var(--retro-white); }

.terminal-title {
    font-size: 14px;
    color: var(--retro-white);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: var(--retro-black);
}

/* Main Layout */
.retro-main {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* Navigation */
.retro-nav {
    background-color: var(--retro-black);
    padding: 20px 0;
    border-right: 1px solid var(--retro-white);
}

.retro-nav.desktop {
    width: 240px;
    display: block;
}

.retro-nav.mobile {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--retro-dark);
    border-top: 2px solid var(--retro-white);
    z-index: 1000;
}

.retro-nav ul {
    list-style: none;
}

.retro-nav li {
    margin-bottom: 5px;
}

.retro-nav a {
    display: flex;
    align-items: center;
    padding: 14px 25px;
    color: var(--retro-white);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.retro-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 0, 0, 0.8),
        transparent
    );
    transition: all 0.5s ease;
}

.retro-nav a:hover::before {
    left: 100%;
}

.retro-nav a i {
    margin-right: 12px;
    font-size: 18px;
    transition: all 0.3s ease;
}

.retro-nav a span {
    font-size: 14px;
    transition: all 0.3s ease;
}

.retro-nav a:hover {
    color: var(--retro-white);
    text-shadow: var(--retro-black);
}

.retro-nav a:hover i {
    transform: scale(1.2);
    color: var(--retro-white);
}

.retro-nav a.active {
    background-color: rgba(0, 0, 0, 0.8)
    color: var(--retro-white);
    border-left: 4px solid var(--retro-white);
}

.retro-nav.mobile ul {
    display: flex;
    justify-content: space-around;
}

.retro-nav.mobile li {
    margin: 0;
    flex: 1;
    text-align: center;
}

.retro-nav.mobile a {
    flex-direction: column;
    padding: 10px 5px;
}

.retro-nav.mobile a i {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.retro-nav.mobile a span {
    font-size: 12px;
}

.retro-nav.mobile a.active {
    border-left: none;
    border-top: 3px solid var(--retro-white);
}

/* Content Wrapper */
.content-wrapper {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== */
/* CARD COMPONENT */
/* ==================== */

.retro-card {
    background-color: var(--retro-dark);
    border: 2px solid var(--retro-light-gray);
    box-shadow: 0 0 20px rgba(227, 245, 255, 0.87)
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.retro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--retro-light-gray);
}

.card-header h2 {
    font-size: 18px;
    color: var(--retro-light-gray);
    display: flex;
    align-items: center;
    
}

.card-header h2 i {
    margin-right: 12px;
    color: var(--retro-cyan);
}

.card-controls {
    display: flex;
    gap: 10px;
}

.card-content {
    padding: 25px;
}

/* ==================== */
/* PROFILE SECTION */
/* ==================== */

.profile-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 40px;
}

.profile-pic {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.retro-avatar {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 20px;
}

.retro-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 3px solid var(--retro-light-gray);
    box-shadow: 0 0 15px var(--retro-black);
    transition: all 0.4s ease;
}

.retro-avatar:hover img {
    transform: scale(1.05);
    box-shadow: 0 0 55px var(--retro-cyan);
}

.retro-avatar:hover .avatar-frame {
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    opacity: 1;
}

.retro-status-light {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 14px;
    height: 14px;
    border-radius: 70%;
    background-color: var(--retro-green);
    box-shadow: 0 0 20px var(--retro-black);
    z-index: 4;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 5px var(--retro-green); }
    70% { box-shadow: 0 0 21px var(--retro-green); }
    100% { box-shadow: 0 0 5px var(--retro-green); }
}

.retro-badges {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.badge {
    padding: 4px 10px;
    font-size: 10px;
    border-radius: 15px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.badge.gold {
    background: linear-gradient(to right, var(--gold), #ffec80);
    color: #000;
border: 2px solid var(--retro-black);
}

.badge.blue {
    background: linear-gradient(to right, var(--retro-light-gray), #ffff);
    color: var(--retro-black);
border: 2px solid var(--retro-black);
}

.badge i {
    margin-right: 5px;
}

/* Terminal Info */
.terminal-title {
    color: var(--retro-light-gray);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--retro-light-gray);
    padding-bottom: 8px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    
}

.retro-terminal {
    background-color: rgba(0, 0, 0, 0.60);
    border: 1px solid var(--retro-light-gray);
    padding: 15px;
    margin: 20px 0;
    position: relative;
}

.retro-terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 255, 255, 0.03) 0%,
        transparent 50%,
        rgba(0, 255, 255, 0.03) 100%
    );
    pointer-events: none;
}

.terminal-line {
    display: flex;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    align-items: center;
}

.prompt {
    color: var(--retro-cyan);
    margin-right: 10px;
    
}

.command {
    color: var(--retro-light-gray);
    margin-right: 10px;
}

.output {
    color: var(--retro-white);
}

.output.active {
    color: var(--retro-cyan);
    font-weight: bold;
    animation: blink 1s step-end infinite;
    
}

/* Bio Section */
.bio-section {
    margin: 25px 0;
}

.retro-heading {
    color: var(--retro-light-gray);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.retro-heading i {
    margin-right: 12px;
    color: var(--retro-cyan);
}

.retro-bio {
    color: var(--retro-white);
    line-height: 1.7;
    font-size: 15px;
}

/* Skills List */
.core-skills-section {
    margin: 25px 0;
    opacity: 0;
    transition: opacity 0.5s ease 0.5s;
}

.retro-skills-list {
    list-style-type: none;
    padding: 0;
    margin: 20px 0;
}

.skill-item {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 15px;
    color: var(--retro-white);
    opacity: 0;
    transform: translateX(-20px);
    animation: skillAppear 0.5s ease forwards;
}

@keyframes skillAppear {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.skill-item:nth-child(1) { animation-delay: 0.1s; }
.skill-item:nth-child(2) { animation-delay: 0.3s; }
.skill-item:nth-child(3) { animation-delay: 0.5s; }
.skill-item:nth-child(4) { animation-delay: 0.7s; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.stat-item {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 20px 15px;
    text-align: center;
    border: 1px solid var(--retro-light-gray);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 200, 255, 0.2);
    border-color: var(--retro-cyan);
}

.stat-value {
    color: var(--retro-cyan);
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: var(--retro-black);
}

.stat-label {
    color: var(--retro-white);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

stat-item.clickable-stat {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item.clickable-stat::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 255, 255, 0.05) 0%,
        transparent 50%,
        rgba(0, 255, 255, 0.05) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-item.clickable-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px cyan;
    border-color: var(--retro-cyan);
}

.stat-item.clickable-stat:hover::before {
    opacity: 1;
}

.stat-item.clickable-stat:hover .stat-value {
    color: var(--retro-cyan);
    text-shadow: 0 0 10px var(--retro-cyan);
}

.stat-item.clickable-stat:hover .stat-label {
    color: var(--retro-cyan);
}

/* Signature */
.signature-box {
    margin-top: 30px;
    text-align: center;
}

.signature-line {
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        var(--retro-black),
        var(--retro-cyan),
        var(--retro-black),
        transparent
    );
    margin: 15px auto;
    width: 60%;
}

.signature-text {
    color: var(--retro-cyan);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 5px;
}

.signature-date {
    color: var(--retro-white);
    font-size: 11px;
    font-style: italic;
}

/* ==================== */
/* PROJECTS SECTION */
/* ==================== */

.project-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
    background: rgba(0, 0, 0, 0.60);
    padding: 20px;
    border: 1px solid var(--retro-light-gray);
    border-radius: 5px;
}

.retro-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-label {
    color: var(--retro-white);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 5px;
    
}

.filter-btn {
    background: rgba(0, 0, 0, 0.60);
    color: var(--retro-cyan);
    border: 1px solid var(--retro-black);
    padding: 8px 15px;
    font-size: 13px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 0, 0, 0.60),
        transparent
    );
    transition: all 0.5s ease;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn.active {
    background: linear-gradient(45deg, var(--retro-light-gray), var(--retro-cyan));
    color: black;
    font-weight: bold;
    box-shadow: 0 0 15px var(--retro-cyan);
    border: 1px solid var(--retro-cyan);
}

.retro-search {
    display: flex;
    position: relative;
    min-width: 250px;
}

.search-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.60);
    border: 1px solid var(--retro-light-gray);
    color: var(--retro-white);
    padding: 10px 40px 10px 15px;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
    border-radius: 20px;
}


.search-input:focus {
    outline: none;
    border-color: var(--retro-light-gray);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.60);
}

.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background: transparent;
    border: none;
    color: var(--retro-light-gray);
    padding: 0 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.project-item {
    background: linear-gradient(
        145deg, 
        rgba(0, 0, 0, 0.60) 0%, 
        rgba(0, 0, 0, 0.60) 100%
    );
    padding: 25px;
    border: 1px solid var(--retro-light-gray);
    border-radius: 5px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.project-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.60) 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.60) 100%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
}

.project-item:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 
        0 15px 30px var(--retro-cyan),
        0 0 0 2px var(--retro-light-gray);
    z-index: 2;
}

.project-item:hover::before {
    opacity: 1;
}

/* Project Header */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.project-icon {
    font-size: 36px;
    color: var(--retro-yellow);
    transition: all 0.5s ease;
    
}

.project-item:hover .project-icon {
    transform: rotate(15deg) scale(1.2);
    color: var(--retro-cyan);
    text-shadow: 0 0 20px var(--retro-cyan);
}

.project-badge {
    background: #ededed;
    color: black;
    padding: 5px 12px;
    font-size: 11px;
    border-radius: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    animation: pulseRed 1s infinite alternate;
}

@keyframes pulseRed {
    from { box-shadow: 0 0 10px var(--retro-cyan); }
    to { box-shadow: 0 0 35px var(--retro-cyan); }
}

.project-item h3 {
    color: var(--retro-cyan);
    margin-bottom: 15px;
    font-size: 20px;
    position: relative;
    display: inline-block;
}

.project-item h3::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--retro-cyan);
    transition: width 0.4s ease;
}

.project-item:hover h3::after {
    width: 100%;
}

.project-item p {
    color: var(--retro-white);
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Tech Tags */
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tech-tag {
    background: rgba(0, 0, 0, 0.60);
    color: var(--retro-white);
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 12px;
    border: 1px solid var(--retro-light-gray);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tech-tag::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(213, 238, 241, 1),
        transparent
    );
    transition: all 0.5s ease;
}

.tech-tag:hover {
    background: rgba(0, 176, 199, 1);
    color: var(--retro-black);
    
    transform: translateY(-2px);
}

.tech-tag:hover::before {
    left: 100%;
}

/* Project Actions */
.project-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.project-actions .retro-btn {
    flex: 1;
    text-align: center;
    padding: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.project-actions .retro-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 0, 0, 0.60),
        transparent
    );
    transition: all 0.6s ease;
}

.project-actions .retro-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.60);
}

.project-actions .retro-btn:hover::before {
    left: 100%;
}

.project-actions .retro-btn.primary {
    background: linear-gradient(45deg, var(--retro-light-gray), var(--retro-cyan));
    color: black;
    font-weight: bold;
}

/* Pagination */
.retro-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-top: 40px;
}

.page-info {
    color: var(--retro-cyan);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: var(--glow);
}

.retro-pagination .retro-btn {
    min-width: 100px;
    position: relative;
    overflow: hidden;
}

.retro-pagination .retro-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.60);
}

/* Project Modal */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.5s ease forwards;
}

.project-modal.active {
    display: block;
}

.modal-content {
    background: linear-gradient(
        145deg, 
        rgba(10, 20, 30, 0.95) 0%, 
        rgba(0, 10, 20, 0.98) 100%
    );
    border: 1px solid transparent;
    border-image: linear-gradient(
        45deg, 
        var(--retro-light-gray), 
        var(--retro-cyan), 
        var(--retro-cyan)
    );
    max-width: 900px;
    margin: 50px auto;
    padding: 30px;
    position: relative;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.60);
    animation: modalAppear 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalAppear {
    from {
        transform: scale(0.8) translateY(50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--retro-yellow);
    font-size: 28px;
    cursor: pointer;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--retro-yellow);
}

.modal-close:hover {
    transform: rotate(90deg) scale(1.1);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px var(--retro-cyan);
}

.modal-body {
    margin-top: 20px;
}

.modal-body h2 {
    color: var(--retro-cyan);
    font-size: 24px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--retro-light-gray);
    padding-bottom: 10px;
}

.modal-body p {
    color: var(--retro-white);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 15px;
}

.modal-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 25px 0;
}

.modal-tech .tech-tag {
    font-size: 13px;
    padding: 7px 15px;
}

.modal-features {
    margin: 30px 0;
}

.modal-features h3 {
    color: var(--retro-cyan);
    margin-bottom: 15px;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-features ul {
    list-style-type: none;
    padding-left: 0;
}

.modal-features li {
    color: var(--retro-white);
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
    font-size: 15px;
}

.modal-features li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--retro-cyan);
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.modal-actions .retro-btn {
    padding: 12px 25px;
}

/* ==================== */
/* ACHIEVEMENTS SECTION */
/* ==================== */

.trophy-case {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    perspective: 1000px;
}

.trophy-item {
    background: linear-gradient(
        145deg, 
        var(--retro-light-dark) 0%, 
        var(--retro-light-black) 100%
    );
    padding: 30px;
    border: 1px solid var(--retro-light-gray);
    border-radius: 5px;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    
    cursor: pointer;
}

.trophy-item::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        transparent,
        transparent,
        transparent,
        var(--retro-black),
        transparent
    );
    transform: rotate(30deg);
    transition: all 0.7s ease;
}

.trophy-item:hover {
    transform: translateY(-10px) rotateX(10deg);
    box-shadow: 
        0 15px 30px cyan,
        0 0 0 2px var(--retro-cyan);
    z-index: 2;
}

.trophy-item:hover::before {
    transform: rotate(30deg) translate(20%, 20%);
}

/* Trophy Icons */
.trophy-icon {
    font-size: 60px;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
    transition: all 0.5s ease;
    text-shadow: var(--long-glow);
}

.trophy-icon::after {
    content: "";
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: currentColor;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    opacity: 0.1;
    transition: all 0.5s ease;
}

.trophy-item:hover .trophy-icon {
    transform: scale(1.2) rotateY(360deg);
}

.trophy-item:hover .trophy-icon::after {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0.2;
}

.trophy-icon.gold {
    color: var(--retro-yellow);
    animation: pulseGold 1s infinite alternate;
}

.trophy-icon.silver {
    color: var(--retro-yellow);
    animation: pulseSilver 1s infinite alternate;
}

.trophy-icon.bronze {
    color: var(--retro-yellow);
    animation: pulseBronze 1s infinite alternate;
}

@keyframes pulseGold {
    0% { text-shadow: 0 0 5px var(--retro-yellow); }
    100% { text-shadow: 0 0 30px var(--retro-yellow), 0 0 50px yellow }
}

@keyframes pulseSilver {
    0% { text-shadow: 0 0 5px var(--silver); }
    100% { text-shadow: 0 0 30px var(--silver), 0 0 50px white; }
}

@keyframes pulseBronze {
    00% { text-shadow: 0 0 5px var(--retro-yellow); }
    100% { text-shadow: 0 0 30px var(--retro-yellow), 0 0 50px yellow }
}

/* Trophy Text */
.trophy-item h3 {
    color: var(--retro-cyan);
    margin-bottom: 15px;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

.trophy-item h3::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--retro-yellow);
    transition: width 0.4s ease;
}

.trophy-item:hover h3::after {
    width: 100%;
}

.trophy-item p {
    color: var(--retro-white);
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.trophy-date {
    color: var(--retro-black);
    font-size: 16px;
    font-style: italic;
    display: inline-block;
    padding: 5px 15px;
    background: cyan;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.trophy-item:hover .trophy-date {
    background: yellow);
    color: var(--retro-black);
}

/* Circuit Board Effect */
.trophy-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(
            90deg, 
            transparent 45%, 
            rgba(0, 255, 255, 0.05) 50%, 
            transparent 55%
        ),
        linear-gradient(
            0deg, 
            transparent 45%, 
            rgba(0, 255, 255, 0.05) 50%, 
            transparent 55%
        );
    background-size: 30px 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.trophy-item:hover::after {
    opacity: 0.5;
}

/* Achievement Modal */
.achievement-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.achievement-modal.active {
    display: flex;
    animation: fadeIn 0.5s ease forwards;
}

.certificate-container {
    position: relative;
    max-width: 85%;
    max-height: 85vh;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.certificate-image {
    width: 100%;
    height: auto;
    border: 3px solid transparent;
    border-image: linear-gradient(
        45deg, 
        var(--retro-cyan), 
        var(--retro-light-gray), 
        var(--retro-light-gray), 
        var(--retro-cyan)
    ) 1;
    box-shadow: 
        0 0 40px rgba(0, 255, 255, 0.5),
        0 0 80px rgba(0, 200, 255, 0.3);
    transform-style: preserve-3d;
    background: rgba(10, 20, 30, 0.9);
    padding: 15px;
}

.rotate-in {
    animation: certificateIn 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.rotate-out {
    animation: certificateOut 0.8s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

@keyframes certificateIn {
    0% {
        transform: rotateX(60deg) rotateZ(-10deg) translateY(100px) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: rotateX(0) rotateZ(0) translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes certificateOut {
    0% {
        transform: rotateX(0) rotateZ(0) translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: rotateX(-60deg) rotateZ(10deg) translateY(100px) scale(0.5);
        opacity: 0;
    }
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 25px;
    color: var(--retro-yellow);
    font-size: 35px;
    cursor: pointer;
    z-index: 2001;
    text-shadow: 0 0 15px yellow;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.7);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--retro-yellow);
}

.modal-close:hover {
    transform: rotate(90deg) scale(1.2);
    background: yellow;
}

/* Certificate Description */
.certificate-desc {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    text-align: center;
    color: var(--retro-cyan);
    font-size: 16px;
    text-shadow: var(--retro-black);
    opacity: 0;
    transition: all 0.5s ease;
}

.certificate-container:hover .certificate-desc {
    bottom: -50px;
    opacity: 1;
}

/* ==================== */
/* SKILLS SECTION */
/* ==================== */

.skills-container {
    display: grid;
    gap: 40px;
    perspective: 1000px;
}

.skill-category {
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--retro-light-gray);
    background: linear-gradient(
        135deg, 
        var(--retro-dark) 0%, 
        var(--retro-black) 100%
    );
    padding: 25px;
    
    border-radius: 5px;
    transition: all 0.5s ease;
}

.skill-category::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    z-index: -1;
    background: linear-gradient(
        45deg, 
        var(--retro-cyan), 
        var(--retro-cyan), 
        var(--retro-dark), 
        var(--retro-black)
    );
    background-size: 400%;
    animation: borderGlow 4s linear infinite;
    opacity: 0.2;
}

.skill-category:hover {
    transform: translateY(-5px) rotateX(5deg);
    box-shadow: 0 15px 30px cyan;
}

.skill-category h3 {
    color: var(--retro-white);
    margin-bottom: 20px;
    padding-bottom: 10px;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--retro-light-gray);
    position: relative;
}

.skill-category h3::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--retro-yellow);
    animation: titleUnderline 2s ease-in-out infinite alternate;
}

/* Skill Bars */
.skill-bars {
    margin-bottom: 40px;
}

.skill-bar {
    margin-bottom: 40px;
    position: relative;
}

.skill-bar label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--retro-white);
    font-size: 15px;
    text-shadow: var(--glow);
}

.bar-container {
    width: 100%;
    height: 14px;
    background-color: var(--retro-black);
    border: 1px solid var(--retro-black);
    position: relative;
    overflow: hidden;
    
}

.bar-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(233,238,240,0.36), 
        transparent
    );
    animation: shine 2.5s infinite linear;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(
        90deg, 
        var(--retro-cyan), 
        var(--retro-cyan)
    );
    position: relative;
    transition: width 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    
}

.bar-fill::after {
    content: attr(data-value);
    position: absolute;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--retro-yellow);
    font-size: 13px;
    font-family: 'Courier New', monospace;
    text-shadow: var(--glow);
}

/* Skill Chips */
.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.retro-chip {
    background-color: rgba(10, 30, 40, 0.7);
    color: var(--retro-cyan);
    padding: 8px 16px;
    border: 1px solid var(--retro-light-gray);
    font-size: 14px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    
}

.retro-chip::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        transparent,
        transparent,
        transparent,
        var(--retro-cyan),
        transparent
    );
    transform: rotate(20deg);
}

.retro-chip:hover {
    background-color: var(--retro-cyan);
    color: var(--retro-black);
    box-shadow: 0 0 20px var(--retro-dark);
    transform: translateY(-3px);
}

/* Tool Grid */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 25px;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--retro-dark);
    padding: 25px 15px;
    border: 1px solid var(--retro-light-gray);
    border-radius: 5px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.tool-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 255, 255, 0.1) 0%,
        transparent 50%,
        rgba(0, 255, 255, 0.1) 100%
    );
    transform: translateX(-100%);
}

.tool-item:hover {
    background: var(--retro-dark)
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 10px 25px black;
    z-index: 1;
}

.tool-item:hover::before {
    animation: toolSlide 1.5s ease infinite;
}

.tool-item i {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--retro-yellow);
    transition: all 0.3s ease;
}

.tool-item:hover i {
    transform: scale(1.3);
    color: var(--retro-cyan);
    text-shadow: 0 0 15px var(--retro-cyan);
}

.tool-item span {
    font-size: 14px;
    color: var(--retro-white);
    text-align: center;
    transition: all 0.3s ease;
}

.tool-item:hover span {
    color: var(--retro-cyan);
    
}

/* ==================== */
/* CONTACT SECTION */
/* ==================== */

.retro-form {
    max-width: 650px;
    margin: 0 auto;
    position: relative;
    padding: 40px;
    background: var(--retro-dark);
    border: 1px solid var(--retro-light-gray);
    box-shadow: 0 0 30px var(--retro-light-cyan);
    border-radius: 5px;
    overflow: hidden;
}

.retro-form::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    z-index: -1;
    background: linear-gradient(
        45deg, 
        var(--retro-cyan), 
        var(--retro-cyan), 
        var(--retro-cyan), 
        var(--retro-cyan)
    );
    background-size: 400%;
    animation: borderGlow 8s linear infinite;
    opacity: 0.5;
}

.form-group {
    margin-bottom: 30px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    color: var(--retro-white);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
    text-shadow: var(--glow);
}

.retro-input {
    width: 100%;
    padding: 14px 20px;
    background-color: var(--retro-dark);
    border: 1px solid var(--retro-light-gray);
    color: var(--retro-white);
    font-family: 'Courier New', monospace;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 15px var(--retro-dark);
    position: relative;
    z-index: 1;
    border-radius: 5px;
}

.retro-input::placeholder {
    color: rgba(200, 200, 255, 0.3);
    font-style: italic;
}

.retro-input:focus {
    outline: none;
    border-color: var(--retro-cyan);
    box-shadow: 
        0 0 15px cyan,
        inset 0 0 15px var(--retro-black);
    background-color: var(--retro-dark);
}

/* Animated Input Focus Effect */
.form-group::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--retro-yellow);
    transition: width 0.4s ease;
}

.form-group:focus-within::after {
    width: 100%;
}

textarea.retro-input {
    resize: vertical;
    min-height: 180px;
    line-height: 1.7;
}

/* Terminal-style Cursor */
.retro-input:focus {
    animation: blinkCursor 1s step-end infinite;
}

@keyframes blinkCursor {
    from, to { border-right: 2px solid var(--retro-yellow); }
    50% { border-right: 2px solid transparent; }
}

/* Form Buttons */
.form-actions {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.retro-btn {
    flex: 1;
    padding: 15px;
    border: none;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border-radius: 5px;
    text-align: center; /* Untuk memastikan teks rata tengah */
    display: flex; /* Menggunakan flexbox */
    justify-content: center; /* Rata tengah horizontal */
    align-items: center; /* Rata tengah vertikal */
}

.retro-btn.primary {
    background: linear-gradient(45deg, var(--retro-black), var(--retro-cyan));
    color: white;
}

.retro-btn:not(.primary) {
background: linear-gradient(45deg, var(--retro-black), var(--retro-cyan));
    color: white;
    
}

.retro-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        rgba(255, 255, 255, 0.1) 100%
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.retro-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px cyan;
}

.retro-btn:hover::before {
    transform: translateX(100%);
}

.retro-btn.primary:hover {
    background: linear-gradient(45deg, var(--retro-cyan), var(--retro-dark));
    color: white;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
}

.social-icon {
    color: var(--retro-cyan);
    font-size: 32px;
    transition: all 0.5s ease;
    position: relative;
    
}

.social-icon::before {
    content: "";
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--retro-cyan);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
    z-index: -1;
}

.social-icon:hover {
    color: var(--retro-dark);
    transform: translateY(-8px) scale(1.2);
    text-shadow: 0 0 25px var(--retro-cyan);
}

.social-icon:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

/* Status Message */
.form-status {
    margin-top: 25px;
    padding: 15px;
    border: 1px solid var(--retro-cyan);
    color: var(--retro-white);
    text-align: center;
    display: none;
    animation: fadeIn 0.5s ease;
    border-radius: 5px;
    background: var(--retro-dark);
}

/* ==================== */
/* FOOTER */
/* ==================== */

.retro-footer {
    background-color: var(--retro-dark);
    padding: 15px 30px;
    border-top: 1px solid var(--retro-purple);
    font-size: 14px;
    position: relative;
    z-index: 100;
}

.console-line {
    display: flex;
    align-items: center;
    justify-content: center;
}

.prompt {
    color: var(--retro-yellow);
    margin-right: 10px;
    text-shadow: var(--glow);
}

.command {
    color: var(--retro-white);
}

.cursor {
    animation: blink 1s step-end infinite;
}

/* ==================== */
/* RESPONSIVE DESIGN */
/* ==================== */

@media (max-width: 1200px) {
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .profile-pic {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .retro-avatar {
        margin-bottom: 20px;
    }
}

@media (max-width: 992px) {
    .retro-nav.desktop {
        display: none;
    }
    
    .retro-nav.mobile {
        display: block;
    }
    
    .retro-main {
        flex-direction: column;
        min-height: auto;
    }
    
    .content-wrapper {
        padding: 20px;
        padding-bottom: 80px;
    }
    
    .project-grid, .trophy-case, .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .project-controls {
        flex-direction: column;
    }
    
    .retro-search {
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .retro-btn {
        width: 100%;
    }
    
    .modal-content {
        margin: 20px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .content-wrapper {
        padding: 15px;
        padding-bottom: 80px;
    }
    
    .project-grid, .trophy-case, .tool-grid {
        grid-template-columns: 1fr;
    }
    
    .retro-form {
        padding: 25px;
    }
    
    .social-links {
        gap: 20px;
    }
    
    .social-icon {
        font-size: 28px;
    }
}

/* Project Preview Modal Styles */
.retro-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
    overflow-y: auto;
  }
  
  .modal-content {
    background-color: #0a0a0a;
    border: 2px solid #000;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 0 20px cyan;
    position: relative;
  }
  
  .modal-header {
    background-color: #111;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 2;
  }
  
  .modal-title {
    margin: 0;
    font-size: 1.2rem;
    color: ##31becc;
    font-family: 'Courier New', monospace;
  }
  
  .modal-controls {
    display: flex;
    gap: 8px;
  }
  
  .modal-controls .control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
  }
  
  .modal-controls .control.red {
    background-color: cyan;
  }
  
  .modal-controls .control.yellow {
    background-color: yellow;
  }
  
  .modal-controls .control.green {
    background-color: white;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .project-preview-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
  }
  
  .preview-main-image {
    flex: 1;
    background-color: #000;
    border: 1px solid #333;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
  }
  
  .preview-main-image img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
  }
  
  .preview-description {
    flex: 1;
    color: #ccc;
  }
  
  .preview-description h4 {
    color: cyan;
    margin-top: 0;
    font-size: 1.5rem;
  }
  
  .project-meta {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    font-size: 0.9rem;
  }
  
  .project-category {
    color: #ff0;
  }
  
  .project-date {
    color: #0ff;
  }
  
  .project-tech-stack h5 {
    color: cyan;
    margin-bottom: 10px;
    font-size: 1rem;
  }
  
  .tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .tech-tags span {
    background-color: #222;
    color: cyan;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
  }
  
  .project-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
  }
  
  .preview-thumbnails {
    background-color: #111;
    padding: 10px;
    border-top: 1px solid #333;
  }
  
  .thumbnails-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
  }
  
  .thumbnail-item {
    width: 80px;
    height: 60px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    flex-shrink: 0;
  }
  
  .thumbnail-item:hover {
    border-color: yellow;
  }
  
  .thumbnail-item.active {
    border-color: #0ff;
  }
  
  .thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  /* Mobile Close Button */
  .mobile-close-btn {
    display: none;
  }
  
  /* Animation for modal */
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  /* Responsive adjustments */
@media (max-width: 768px) {
    .retro-modal {
      align-items: flex-start;
      padding: 20px 0 80px; /* Top 20px, bottom 80px to clear navigation */
    }
  
    .modal-content {
      width: 95%;
      max-width: 95%;
      max-height: 80vh; /* Reduced from 90vh to ensure space */
      overflow-y: auto;
      margin: 0 auto;
      position: relative;
    }
    
    .project-preview-container {
      flex-direction: column;
      gap: 15px;
    }
    
    .preview-main-image {
      min-height: 150px;
      max-height: 150px;
      width: 43%;
    }
    
    .preview-description {
      max-height: none;
      overflow-y: visible;
      padding-bottom: 10px;
    }
    
    .preview-thumbnails {
      position: sticky;
      bottom: 20px; /* Raised from bottom */
      background-color: #0a0a0a;
      z-index: 1;
      margin-top: 10px;
      padding: 10px 0;
      border-top: 1px solid #333;
    }
    
    .thumbnails-container {
      padding: 5px 0;
      gap: 8px;
    }
    
    .thumbnail-item {
      width: 55px;
      height: 40px;
    }
    
    .mobile-close-btn {
      display: block;
      text-align: center;
      margin: 15px 0 0;
      padding: 10px 0 0;
      border-top: 1px solid #333;
    }
    
    #mobileCloseModal {
      width: 100%;
      background-color: cyan;
      color: white;
      padding: 8px;
      font-size: 0.9rem;
    }
    
    #mobileCloseModal:hover {
      background-color: yellow;
    }
  }
  
  @media (max-width: 480px) {
    .retro-modal {
      padding: 15px 0 70px; /* Slightly less padding on very small screens */
    }
  
    .modal-header {
      padding: 6px 8px;
      position: sticky;
      top: 0;
    }
    
    .modal-title {
      font-size: 0.9rem;
    }
    
    .modal-controls .control {
      width: 8px;
      height: 8px;
    }
    
    .preview-main-image {
      min-height: 140px;
      max-height: 140px;
    }
    
    .preview-description h4 {
      font-size: 1.1rem;
      margin-bottom: 5px;
    }
    
    .project-meta {
      font-size: 0.8rem;
      gap: 10px;
    }
    
    .project-actions {
      flex-direction: column;
      gap: 6px;
      margin-top: 15px;
    }
    
    .project-actions .retro-btn {
      width: 100%;
      padding: 6px;
      font-size: 0.8rem;
    }
    
    .modal-body {
      padding: 12px;
    }
  
    .tech-tags span {
      font-size: 0.7rem;
      padding: 2px 6px;
    }
  
    .preview-thumbnails {
      bottom: 15px;
    }
  }

  .music-control.floating {
    position: fixed;
    top: 44px;
    right: 20px;
    z-index: 1600;
}

.music-control.floating .retro-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

/* ==================== */
/* UTILITY ANIMATIONS */
/* ==================== */

@keyframes borderGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes titleUnderline {
    0% { width: 50px; left: 0; }
    50% { width: 100px; }
    100% { width: 50px; left: calc(100% - 50px); }
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    20% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

@keyframes toolSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}