/* ==================== VARIABLES & BASIC SETUP ==================== */
:root {
    --header-height: 3.5rem;
    --bg-color: #1a1a2e;
    --bg-light-color: #16213e;
    --primary-color: #e94560;
    --secondary-color: #0f3460;
    --text-color: #dcdcdc;
    --header-font-color: #ffffff;
    --title-color: #ffffff;
    --body-font: 'Poppins', sans-serif;
    --header-font: 'Orbitron', sans-serif;
    --h1-font-size: 2.5rem;
    --h2-font-size: 2rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--bg-color);
    color: var(--text-color);
}

h1,
h2,
h3 {
    font-family: var(--header-font);
    color: var(--title-color);
    font-weight: 700;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

/* ==================== FANCY SCROLLBAR STYLES ==================== */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--secondary-color);
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-color);
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 20px;
    border: 3px solid var(--secondary-color);
    transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #ff6b81;
}

/* ==================== NEON CURSOR TRAIL ==================== */
#neon-cursor-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

.container {
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0 2rem;
}

.section-title {
    font-size: var(--h2-font-size);
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.header {
    width: 100%;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--header-font);
    color: var(--header-font-color);
    font-weight: 700;
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--header-font-color);
    font-weight: 600;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.home {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#matrix-canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.home-content {
    position: relative;
    z-index: 2;
    padding: 1rem;
}

.home-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    object-fit: cover;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 25px var(--primary-color);
}

.home-title {
    font-size: var(--h1-font-size);
    margin-bottom: 0.5rem;
}

.home-subtitle {
    font-size: var(--h3-font-size);
    font-family: var(--body-font);
    font-weight: 400;
    color: var(--text-color);
    margin-bottom: 2.5rem;
    height: 1.5em;
}

#animated-subtitle::after {
    content: '_';
    font-weight: 300;
    color: var(--primary-color);
    animation: blink-caret 1s step-end infinite;
}

@keyframes blink-caret {
    from,
    to {
        color: transparent;
    }
    50% {
        color: var(--primary-color);
    }
}

.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.3s;
    border: 2px solid var(--primary-color);
}

.button:hover {
    background-color: #d43d51;
    transform: translateY(-3px);
}

.button-outline {
    background-color: transparent;
    color: var(--primary-color);
}

.button-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.button-small {
    padding: 0.75rem 1.5rem;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: flex-start;
}

.about-bio h3 {
    margin-bottom: 1rem;
    font-size: var(--h3-font-size);
}

.about-bio p {
    line-height: 1.7;
}

.expertise-box {
    background-color: var(--bg-light-color);
    border-radius: 10px;
    padding: 2rem;
    border: 1px solid var(--secondary-color);
}

.expertise-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: var(--h3-font-size);
}

.expertise-row {
    display: flex;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--secondary-color);
}

.expertise-row:last-child {
    border-bottom: none;
}

.expertise-label {
    flex-basis: 35%;
    font-weight: 600;
    color: var(--title-color);
    padding-right: 1rem;
}

.expertise-value {
    flex: 1;
    line-height: 1.6;
}

.project-search-container {
    position: relative;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

#project-search-bar {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 3rem;
    background-color: var(--bg-light-color);
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    color: var(--text-color);
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    outline: none;
    transition: border-color 0.3s ease;
}

#project-search-bar:focus {
    border-color: var(--primary-color);
}

#project-search-bar::placeholder {
    color: #888;
}

.project-search-icon {
    position: absolute;
    left: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

.project-card {
    background-color: var(--bg-light-color);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.project-card:hover {
    transform: rotateY(10deg) rotateX(5deg) translateZ(20px);
    box-shadow: -10px 10px 30px rgba(0, 0, 0, 0.5);
}

.project-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background-color: var(--secondary-color);
}

.project-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    margin-bottom: 0.75rem;
}

.project-description {
    flex-grow: 1;
    margin-bottom: 1rem;
}

.project-stack {
    font-size: var(--small-font-size);
    margin-bottom: 1.5rem;
    color: #aaa;
}

.project-stack strong {
    color: var(--text-color);
}

.project-buttons {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-form .form-group {
    position: relative;
    margin-bottom: 2rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--bg-light-color);
    border: 2px solid var(--secondary-color);
    border-radius: 5px;
    color: var(--text-color);
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    outline: none;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
}

.contact-form label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: #aaa;
    pointer-events: none;
    transition: all 0.3s ease;
}

.contact-form input:focus+label,
.contact-form input:not(:placeholder-shown)+label,
.contact-form textarea:focus+label,
.contact-form textarea:not(:placeholder-shown)+label {
    top: -0.75rem;
    left: 0.75rem;
    font-size: var(--small-font-size);
    color: var(--primary-color);
    background-color: var(--bg-color);
    padding: 0 0.25rem;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 2rem;
    line-height: 1.7;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.footer {
    background-color: var(--bg-light-color);
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    color: #aaa;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-left: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-light-color);
    margin: 10% auto;
    padding: 2.5rem;
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.close-button:hover,
.close-button:focus {
    color: var(--primary-color);
}

#modal-title {
    margin-bottom: 1rem;
    padding-right: 2rem;
}

#modal-description {
    line-height: 1.7;
    margin-bottom: 2rem;
}

.modal-code-preview h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-family: var(--header-font);
}

.modal-code-preview pre {
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modal-code-preview code.hljs {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    line-height: 1.6;
}

@media screen and (max-width: 768px) {
    :root {
        --h1-font-size: 2rem;
        --h2-font-size: 1.5rem;
        --h3-font-size: 1.15rem;
    }
    .nav-list {
        gap: 1rem;
    }
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .expertise-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .expertise-label {
        flex-basis: auto;
    }
    .projects-container {
        grid-template-columns: 1fr;
    }
    .project-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }
    .footer-container {
        flex-direction: column;
        gap: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    .home-title {
        font-size: 1.8rem;
    }
    .home-subtitle {
        font-size: 1rem;
    }
    .button {
        padding: 0.8rem 1.6rem;
    }
}