:root {
    --neon-primary: #00ffff;
    --neon-secondary: #fc00ff;
    --neon-tertiary: #fffc00;
    --neon-quaternary: #00ff00;
    --neon-red: #ff0055;
    --dark-bg: #0a0a12;
    --darker-bg: #05050b;
    --card-bg: rgba(20, 20, 35, 0.5);
    --modal-bg: rgba(15, 15, 25, 0.95);
    --text-color: #fff;
    --shadow-primary: 0 0 10px rgba(0, 255, 255, 0.7), 0 0 20px rgba(0, 255, 255, 0.5), 0 0 30px rgba(0, 255, 255, 0.3);
    --shadow-secondary: 0 0 10px rgba(252, 0, 255, 0.7), 0 0 20px rgba(252, 0, 255, 0.5), 0 0 30px rgba(252, 0, 255, 0.3);
    --shadow-tertiary: 0 0 10px rgba(255, 252, 0, 0.7), 0 0 20px rgba(255, 252, 0, 0.5), 0 0 30px rgba(255, 252, 0, 0.3);
    --shadow-quaternary: 0 0 10px rgba(0, 255, 0, 0.7), 0 0 20px rgba(0, 255, 0, 0.5), 0 0 30px rgba(0, 255, 0, 0.3);
    --shadow-red: 0 0 10px rgba(255, 0, 85, 0.7), 0 0 20px rgba(255, 0, 85, 0.5), 0 0 30px rgba(255, 0, 85, 0.3);
    --gradient-blue: linear-gradient(135deg, #12c2e9, #c471ed);
    --gradient-purple: linear-gradient(135deg, #7928ca, #ff0080);
    --gradient-gold: linear-gradient(135deg, #FFD700, #FFA500);
    --gradient-green: linear-gradient(135deg, #00b09b, #96c93d);
    --gradient-orange: linear-gradient(135deg, #FF8C00, #FF512F);
}

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

body {
    font-family: 'Roboto', sans-serif;
    background: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background: radial-gradient(circle at 50% 50%, #0c1318, #050508);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%231a1a2a' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E"),
        linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.3));
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
}

/* Neon Background */
.neon-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.neon-light {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    mix-blend-mode: screen;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Header Styles */
header {
    padding: 3rem 0;
    margin-bottom: 4rem;
    text-align: center;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: var(--gradient-purple);
    border-radius: 3px;
}

.logo h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 6rem;
    margin-bottom: 2rem;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 4px;
}

.neon-text {
    color: var(--neon-primary);
    text-shadow: var(--shadow-primary);
    animation: neonPulse 2s infinite alternate;
    position: relative;
    display: inline-block;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.neon-text::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--neon-primary);
    filter: blur(30px);
    opacity: 0.3;
    z-index: -1;
}

.titles {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 0 auto 2.5rem;
    max-width: 800px;
}

.title-item {
    font-size: 1rem;
    display: inline-block;
    padding: 0.4rem 0;
    position: relative;
    transition: all 0.3s ease;
    text-transform: lowercase;
    letter-spacing: 1px;
}

.title-item:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--neon-secondary);
    box-shadow: var(--shadow-secondary);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.title-item:hover:after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-item {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3);
}

.social-item:nth-child(1):hover {
    background: var(--gradient-blue);
}

.social-item:nth-child(2):hover {
    background: var(--gradient-purple);
}

.social-item:nth-child(3):hover {
    background: var(--gradient-gold);
}

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

.project-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    height: 220px;
    cursor: pointer;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
    will-change: transform;
    transform: translateZ(0);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 0;
    transition: opacity 0.4s ease;
}

.project-card[data-project="Frontier"]::before {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), transparent);
}

.project-card[data-project="Aicord"]::before {
    background: linear-gradient(135deg, rgba(252, 0, 255, 0.1), transparent);
}

.project-card[data-project="GPTHero"]::before {
    background: linear-gradient(135deg, rgba(255, 252, 0, 0.1), transparent);
}

.project-card[data-project="Warden"]::before {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.1), transparent);
}

.project-card:hover::before {
    opacity: 1;
}

.project-card[data-project="Frontier"] {
    box-shadow: 0 0 0 1px rgba(0, 255, 255, 0.2);
}

.project-card[data-project="Aicord"] {
    box-shadow: 0 0 0 1px rgba(252, 0, 255, 0.2);
}

.project-card[data-project="GPTHero"] {
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.2);
}

.project-card[data-project="Warden"] {
    box-shadow: 0 0 0 1px rgba(0, 255, 0, 0.2);
}

.project-card:hover {
    transform: translateY(-10px) translateZ(0);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.project-card[data-project="Frontier"]:hover {
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.2), 0 0 0 1px rgba(0, 255, 255, 0.4);
}

.project-card[data-project="Aicord"]:hover {
    box-shadow: 0 10px 30px rgba(252, 0, 255, 0.2), 0 0 0 1px rgba(252, 0, 255, 0.4);
}

.project-card[data-project="GPTHero"]:hover {
    box-shadow: 0 10px 30px rgba(255, 252, 0, 0.2), 0 0 0 1px rgba(255, 252, 0, 0.4);
}

.project-card[data-project="Warden"]:hover {
    box-shadow: 0 10px 30px rgba(0, 255, 0, 0.2), 0 0 0 1px rgba(0, 255, 0, 0.4);
}

.project-inner {
    padding: 1.8rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
}

.project-inner h2 {
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    background-clip: text;
    -webkit-background-clip: text;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.project-card[data-project="Frontier"] .project-inner h2 {
    color: var(--neon-primary);
}

.project-card[data-project="Aicord"] .project-inner h2 {
    color: var(--neon-secondary);
}

.project-card[data-project="GPTHero"] .project-inner h2 {
    color: var(--neon-tertiary);
}

.project-card[data-project="Warden"] .project-inner h2 {
    color: var(--neon-quaternary);
}

.project-inner p {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Tag positioning container */
.tag-container {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: row-reverse;
    gap: 0.7rem;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.new-tag, .beta-tag, .retired-tag, .dev-tag {
    font-size: 0.7rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.new-tag {
    background: linear-gradient(to right, #12c2e9, #c471ed);
    color: #fff;
    border: none;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.new-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to left, #12c2e9, #c471ed);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.beta-tag {
    background: linear-gradient(to right, #00b09b, #96c93d);
    color: #fff;
    border: none;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.beta-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to left, #00b09b, #96c93d);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.retired-tag {
    background: linear-gradient(to right, #7928ca, #ff0080);
    color: #fff;
    border: none;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.retired-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to left, #7928ca, #ff0080);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.dev-tag {
    background: linear-gradient(to right, #FF8C00, #FF512F);
    color: #fff;
    border: none;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.dev-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to left, #FF8C00, #FF512F);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

/* Gradient animation on hover */
.project-card:hover .new-tag::before,
.project-card:hover .beta-tag::before,
.project-card:hover .retired-tag::before,
.project-card:hover .dev-tag::before,
.modal-content:hover .new-tag::before,
.modal-content:hover .beta-tag::before,
.modal-content:hover .retired-tag::before,
.modal-content:hover .dev-tag::before {
    opacity: 1;
}

.project-card:hover .new-tag,
.project-card:hover .beta-tag,
.project-card:hover .retired-tag,
.project-card:hover .dev-tag,
.modal-content:hover .new-tag,
.modal-content:hover .beta-tag,
.modal-content:hover .retired-tag,
.modal-content:hover .dev-tag {
    transform: scale(1.05) translateZ(0);
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 11, 0.85);
    z-index: 1000;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.modal-content {
    margin: 5% auto;
    width: 90%;
    max-width: 900px;
    background: var(--modal-bg);
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: modalFadeIn 0.4s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

.modal-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2rem;
    background-clip: text;
    -webkit-background-clip: text;
}

/* Modal tag container */
.modal-tag-container {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 0.7rem;
    margin-left: 1.5rem;
}

.modal-body {
    padding: 2rem;
}

.project-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-section h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: var(--neon-primary);
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
    opacity: 0.8;
    text-transform: uppercase;
}

.detail-section p {
    font-size: 1.1rem;
    line-height: 1.4;
}

.project-explanation {
    margin-bottom: 2.5rem;
}

.project-explanation h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: var(--neon-primary);
    margin-bottom: 1.2rem;
    letter-spacing: 1px;
    opacity: 0.8;
    text-transform: uppercase;
}

.project-explanation p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.project-features {
    margin-top: 2rem;
}

.project-features ul {
    list-style-type: none;
    padding-left: 0.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.project-features li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.8rem;
    line-height: 1.5;
}

.project-features li:before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--neon-primary);
}

.project-image {
    margin-top: 2.5rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-image img {
    width: 100%;
    height: auto;
    display: block;
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.8rem;
    font-size: 2.2rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 2;
}

.close-btn:hover {
    color: var(--neon-primary);
    text-shadow: var(--shadow-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes neonPulse {
    from {
        text-shadow: 0 0 7px rgba(0, 255, 255, 0.7), 0 0 10px rgba(0, 255, 255, 0.7), 0 0 21px rgba(0, 255, 255, 0.7);
    }
    to {
        text-shadow: 0 0 10px rgba(0, 255, 255, 0.9), 0 0 20px rgba(0, 255, 255, 0.9), 0 0 40px rgba(0, 255, 255, 0.9);
    }
}

@keyframes glow {
    from {
        box-shadow: 0 0 5px rgba(0, 255, 255, 0.7), 0 0 10px rgba(0, 255, 255, 0.7);
    }
    to {
        box-shadow: 0 0 10px rgba(0, 255, 255, 0.9), 0 0 20px rgba(0, 255, 255, 0.9);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatAnimation {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .logo h1 {
        font-size: 4rem;
    }
    
    .titles {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .title-item {
        font-size: 1rem;
    }
    
    .social-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .project-details {
        grid-template-columns: 1fr;
    }
    
    .project-features ul {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    .logo h1 {
        font-size: 3.2rem;
    }
    
    .projects {
        grid-template-columns: 1fr;
    }
    
    .modal-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modal-tag-container {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .detail-section p {
        font-size: 1rem;
    }
}

/* Easter Egg Animation */
.falling-image {
    position: fixed;
    top: -100px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.5;
}

#z-letter {
    cursor: pointer;
    position: relative;
    display: inline-block;
}

#z-letter:hover {
    animation: pulse 0.5s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

/* Website link styling */
#project-website {
    color: var(--neon-primary);
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    padding-bottom: 2px;
}

#project-website::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background: var(--neon-primary);
    box-shadow: var(--shadow-primary);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

#project-website:hover {
    text-shadow: var(--shadow-primary);
}

#project-website:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}
