:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --accent-color: #ffffff;
    --secondary-text: #888888;
    --border-color: #333333;
    --terminal-bg: rgba(10, 10, 10, 0.95);
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
    /* IE 10 and IE 11 */
    user-select: none;
    /* Standard syntax */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.modal-content {
    background: #0a0a0a;
    border: 1px solid var(--border-color);
    padding: 40px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.survey-option {
    display: block;
    margin: 15px 0;
    padding: 15px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    /* Force pointer for real mouse interaction if needed, but we have custom cursor */
    transition: all 0.3s;
    text-align: left;
    font-family: var(--font-mono);
}

.survey-option:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

.survey-option input {
    margin-right: 10px;
}

/* 3D Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
}

/* Custom Cursor */
.cursor-dot {
    width: 5px;
    height: 5px;
    background-color: white;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    border-radius: 50%;
    z-index: 20002;
    /* Higher than modal (20000) */
    mix-blend-mode: difference;
    transition: transform 0.1s;
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    border-radius: 50%;
    z-index: 20001;
    /* Higher than modal */
    transition: transform 0.15s ease-out;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-color);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary-text);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text-color);
}

.lang-switcher {
    display: flex;
    gap: 5px;
}

.lang-switcher button {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--secondary-text);
    padding: 5px 10px;
    font-family: var(--font-mono);
    cursor: none;
    transition: all 0.3s;
}

.lang-switcher button:hover,
.lang-switcher button.active {
    color: var(--bg-color);
    background: var(--text-color);
}

.terminal-btn {
    border-color: var(--text-color) !important;
    font-weight: bold;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: none;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.terminal-text {
    font-family: var(--font-mono);
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--secondary-text);
}

.prompt {
    color: #00ff00;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 10px;
    font-family: var(--font-sans);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--secondary-text);
    font-family: var(--font-mono);
    margin-bottom: 20px;
}

.hero-info {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--secondary-text);
}

.countdown-container {
    margin-bottom: 40px;
    font-family: var(--font-mono);
}

.countdown-label {
    font-size: 0.8rem;
    color: var(--secondary-text);
    margin-bottom: 5px;
}

.timer {
    font-size: 1.2rem;
    font-weight: 700;
    word-spacing: 5px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    padding: 12px 30px;
    text-decoration: none;
    font-family: var(--font-mono);
    font-weight: 600;
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--text-color);
    transition: all 0.3s;
    cursor: none;
}

.primary-btn {
    background: var(--text-color);
    color: var(--bg-color);
}

.primary-btn:hover {
    background: transparent;
    color: var(--text-color);
}

.secondary-btn {
    background: transparent;
    color: var(--text-color);
}

.secondary-btn:hover {
    background: var(--border-color);
}

/* Sections */
.section {
    padding: 100px 20px;
    border-bottom: 1px solid var(--border-color);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    font-family: var(--font-mono);
    margin-bottom: 50px;
    border-left: 5px solid var(--text-color);
    padding-left: 20px;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    border: 1px solid var(--border-color);
    padding: 30px;
    transition: all 0.3s;
}

.service-card:hover {
    border-color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

.service-icon {
    font-size: 2rem;
    margin-bottom: 20px;
}

.service-title {
    font-family: var(--font-mono);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.service-desc {
    color: var(--secondary-text);
    font-size: 0.9rem;
}

/* Timeline */
.timeline {
    border-left: 2px solid var(--border-color);
    padding-left: 30px;
}

.timeline-item {
    margin-bottom: 40px;
    position: relative;
    opacity: 0;
    /* Hidden initially for GSAP */
    transform: translateY(20px);
}

.timeline-item::before {
    content: "";
    width: 12px;
    height: 12px;
    background: var(--bg-color);
    border: 2px solid var(--text-color);
    position: absolute;
    left: -37px;
    top: 5px;
    border-radius: 50%;
}

.timeline-item .year {
    font-family: var(--font-mono);
    color: var(--secondary-text);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.timeline-item .role {
    font-size: 1.2rem;
    font-weight: 700;
}

.timeline-item .company {
    font-family: var(--font-mono);
    font-weight: 600;
    margin-bottom: 10px;
}

.timeline-item .description {
    color: var(--secondary-text);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
}

.skill-card {
    border: 1px solid var(--border-color);
    padding: 15px;
    text-align: center;
    font-family: var(--font-mono);
    transition: all 0.3s;
    font-size: 0.9rem;
}

.skill-card:hover {
    background: var(--text-color);
    color: var(--bg-color);
    transform: translateY(-5px);
}

/* Collaboration Scroller */
.collab-scroller {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.collab-track {
    display: inline-block;
    animation: scroll 20s linear infinite;
}

.collab-item {
    display: inline-block;
    padding: 15px 30px;
    border: 1px solid var(--border-color);
    margin-right: 20px;
    font-family: var(--font-mono);
    color: var(--secondary-text);
}

.collab-item strong {
    color: var(--text-color);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Portfolio Swiper */
.swiper {
    width: 100%;
    padding-bottom: 50px;
}

.project-card {
    border: 1px solid var(--border-color);
    padding: 30px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    transition: all 0.3s;
    height: auto;
}

.project-card:hover {
    border-color: var(--text-color);
}

.project-title {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.project-tech {
    color: var(--secondary-text);
    font-size: 0.85rem;
    margin-bottom: 20px;
    font-family: var(--font-mono);
    text-transform: uppercase;
}

.swiper-pagination-bullet {
    background: var(--text-color);
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--text-color);
}

/* Contact */
.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.contact-item {
    text-decoration: none;
    color: var(--text-color);
    font-family: var(--font-mono);
    border: 1px solid var(--border-color);
    padding: 20px;
    flex: 1;
    text-align: center;
    transition: all 0.3s;
    min-width: 200px;
    cursor: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.contact-item span {
    font-size: 1.2rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.contact-item small {
    color: var(--secondary-text);
    font-size: 0.8rem;
}

.contact-item:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

.contact-item:hover small {
    color: var(--bg-color);
}

/* Footer */
footer {
    padding: 50px 20px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--secondary-text);
}

/* Terminal Modal */
.terminal-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.terminal-modal.active {
    display: flex;
}

.terminal-window {
    width: 80%;
    max-width: 800px;
    height: 60vh;
    background: var(--terminal-bg);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    font-family: var(--font-mono);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    padding: 10px;
    background: #1a1a1a;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
}

.close-terminal {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
}

.terminal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    color: #cccccc;
    font-size: 0.9rem;
}

.terminal-input-area {
    padding: 10px 20px;
    display: flex;
    align-items: center;
}

.terminal-input-area input {
    background: none;
    border: none;
    color: var(--text-color);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    flex: 1;
    margin-left: 10px;
    outline: none;
}

.cmd {
    color: #e6db74;
}

/* Responsive & Mobile Optimization */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .section {
        padding: 80px 20px;
    }
}

@media (max-width: 768px) {

    /* Navigation */
    .navbar {
        padding: 15px 20px;
    }

    .nav-links {
        display: none;
        position: fixed;
        /* Fixed for full screen menu */
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 99;
        /* Below toggle but above content */
        gap: 30px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .menu-toggle {
        display: block;
        z-index: 101;
        /* Above mobile menu */
    }

    /* Hero */
    .hero-title {
        font-size: 2.2rem;
        word-break: break-word;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-info {
        flex-direction: column;
        gap: 10px;
    }

    /* Buttons */
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    /* Services & Skills */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    /* Modals */
    .modal-content {
        width: 90%;
        padding: 25px;
    }

    .terminal-window {
        width: 95%;
        height: 50vh;
    }

    .terminal-header {
        font-size: 0.8rem;
    }

    /* Cursor */
    .cursor-dot,
    .cursor-outline {
        display: none !important;
        /* Force hide on mobile to prevent touch issues */
    }

    body,
    a,
    button,
    input {
        cursor: auto !important;
        /* Restore default cursor */
    }

    /* Timeline */
    .timeline {
        border-left: 2px solid var(--border-color);
        padding-left: 20px;
    }

    .timeline-item::before {
        left: -27px;
    }

    /* Collaboration Scroller */
    .collab-item {
        font-size: 0.8rem;
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .lang-switcher button {
        padding: 5px;
        font-size: 0.8rem;
    }
}