:root {
    --bg-color: #050510;
    --card-bg: rgba(20, 20, 35, 0.6);
    --primary-color: #00f3ff;
    --secondary-color: #bd00ff;
    --text-color: #e0e0e0;
    --accent-color: #ffd700;
    /* Gold for chess stuff */
    --font-heading: 'Orbitron', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-code: 'Fira Code', monospace;
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glow-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Animation */
.background-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.stars {
    width: 1px;
    height: 1px;
    background: transparent;
    box-shadow: 1744px 122px #FFF, 134px 1321px #FFF, 92px 859px #FFF;
    /* Simplified for brevity, usually huge list */
    animation: animStar 50s linear infinite;
}

.chess-grid-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    perspective: 1000px;
    transform: rotateX(60deg) scale(2);
    top: 20%;
    pointer-events: none;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(5, 5, 16, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: var(--glass-border);
}

.logo {
    font-family: var(--font-code);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo .bracket {
    color: var(--secondary-color);
}

.logo .slash {
    color: var(--text-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-item {
    text-decoration: none;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s;
}

.nav-item:hover {
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 5%;
}

.profile-frame {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background-color: #000;
}

.rotating-border {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px dashed rgba(0, 243, 255, 0.3);
    border-radius: 50%;
    animation: rotate 10s linear infinite;
}

.glitch-text {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

/* Terminal Window */
.terminal-window {
    background: rgba(10, 10, 20, 0.9);
    border: var(--glass-border);
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.title {
    font-family: var(--font-code);
    font-size: 0.8rem;
    margin-left: auto;
    color: rgba(255, 255, 255, 0.5);
}

.terminal-body {
    padding: 1.5rem;
    font-family: var(--font-code);
    text-align: left;
    color: var(--primary-color);
}

.prompt {
    color: var(--secondary-color);
    margin-right: 0.5rem;
}

/* Typing Effect Cursor */
.cursor {
    animation: blink 1s step-end infinite;
}

/* Common Section Styles */
.section {
    padding: 5rem 10%;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-color);
}

.section-title i {
    color: var(--secondary-color);
    margin-right: 1rem;
}

/* Glass Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow-shadow);
    border-color: var(--primary-color);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.skill-card:hover {
    border-color: var(--primary-color);
    background: rgba(0, 243, 255, 0.05);
}

.skill-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
    border-radius: 2px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-image {
    height: 200px;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.placeholder-grid {
    width: 200%;
    height: 200%;
    background-image: radial-gradient(var(--secondary-color) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.2;
    transform: rotate(45deg);
}

.overlay-icon {
    position: absolute;
    font-size: 3rem;
    color: var(--text-color);
    z-index: 2;
}

.card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card h3 {
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

.tech-tags {
    margin: 1rem 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tech-tags span {
    font-size: 0.8rem;
    font-family: var(--font-code);
    background: rgba(0, 243, 255, 0.1);
    color: var(--primary-color);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(0, 243, 255, 0.2);
}

.card-actions {
    margin-top: auto;
    display: flex;
    gap: 1rem;
}

.btn-small {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.btn-small:hover {
    opacity: 1;
}

/* Contact */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.social-btn {
    font-size: 2rem;
    color: var(--text-color);
    transition: transform 0.2s, color 0.2s;
}

.social-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    border-top: var(--glass-border);
    margin-top: 4rem;
}

.blink {
    color: var(--green);
    animation: blink 2s infinite;
}

/* Buttons */
.cta-button {
    position: relative;
    display: inline-block;
    padding: 1rem 2rem;
    margin-top: 2rem;
    color: var(--bg-color);
    background: var(--primary-color);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
    transition: all 0.3s;
}

.cta-button:hover {
    background: var(--secondary-color);
    color: #fff;
    box-shadow: 0 0 15px var(--secondary-color);
}

@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes animStar {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-2000px);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .glitch-text {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(5, 5, 16, 0.95);
        padding: 2rem;
        border-bottom: 1px solid var(--primary-color);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
        color: var(--primary-color);
    }

    .section {
        padding: 4rem 5%;
    }
}

/* Animations added by JS */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}
