/* --- 1. Global & Scrollbar --- */
:root {
    --bg-color: #1d1d22;
    --text-main: #e6f1ff;
    --text-mid: #bbc4e0;
    --text-dim: #8892b0;
    --card-bg: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.1);
    --neon-red: #DC3545;
    --faded-red: #dc35466b;
    --single-draw-duration: 1.5s;
    --pulse-duration: 1s;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: var(--neon-red);
    border-radius: 10px;
    border: 1px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--faded-red) !important;
}

html {
    scrollbar-width: thin;
    scrollbar-color: var(--neon-red) transparent;
    scroll-behavior: smooth;
    overflow-anchor: none;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- 2. Hide for Animation Control --- */
.sub-fade,
.main-title,
.hero-desc,
.nav-link,
.scroll-indicator,
.tech-label,
.tech-subtitle,
.tech-item,
.exp-card,
.skill-category h5,
.gallery-item {
    opacity: 0;
}

.notable-projects-wrapper .other-project-label,
.notable-projects-wrapper .tech-subtitle,
.projects .tech-label,
.projects .tech-subtitle {
    opacity: 0;
}

/* --- 3. Navbar --- */
.navbar {
    border-bottom: 1px solid rgba(187, 196, 224, 0.05);
    box-shadow: 0 15px 40px -20px rgba(187, 196, 224, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(29, 29, 34, 0.8);
    transition: all 0.3s ease;
}

.nav-link {
    color: var(--text-main) !important;
    font-size: 14px;
}

.nav-link:hover {
    color: var(--neon-red) !important;
    text-shadow: 0 0 10px rgba(220, 53, 69, 0.1);
}

.nav-svg {
    height: 35px;
    width: auto;
    fill: var(--neon-red);
}

.logo:hover .nav-svg {
    filter: drop-shadow(0 0 8px var(--neon-red));
}

.btn-talk {
    background: transparent;
    border: 1px solid var(--neon-red);
    color: var(--text-main);
    padding: 10px 20px;
    transition: 0.3s;
}

.btn-talk:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* --- 4. Hero Section --- */
.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    position: relative;
}

.container {
    max-width: 1050px;
}

.main-title {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    font-weight: 800;
    color: var(--neon-red);
    margin: 10px 0;
}

.main-title .dim-text {
    color: var(--text-mid);
    font-weight: 400;
}

.sub-fade {
    color: var(--text-mid);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: bold;
}

.hero-desc {
    color: var(--text-dim);
    line-height: 1.6;
    font-size: 1.1rem;
    margin-top: 20px;
    font-style: italic;
}

/* SVG Watermark */
.logo-container {
    width: 100%;
    max-width: 400px;
}

#logoPath {
    stroke: var(--neon-red);
    stroke-width: 1;
    fill: none;
}

@keyframes draw-path {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes pulse {
    0% {
        stroke: var(--neon-red);
    }

    100% {
        stroke: var(--faded-red);
    }
}

.ready {
    animation: draw-path var(--single-draw-duration) linear 0s 3 alternate;
}

.pulsing {
    animation: pulse var(--pulse-duration) ease-in-out 0s 5 alternate forwards;
}

@media (min-width: 992px) {
    .hero-watermark {
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    /* This makes it go above the watermark logo */
    .desktop-no-wrap {
        white-space: nowrap;
        position: relative;
        z-index: 5;
    }
}

@media (max-width: 991px) {
    .hero-watermark {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 60vw;
        max-width: 300px;
        z-index: 1;
        opacity: 0.7;
        pointer-events: none;
    }

    .hero-content {
        position: relative;
        z-index: 2;
        text-align: center;
    }

    .logo-container {
        max-width: none;
    }

    .main-title {
        font-size: 2.8rem;
    }

    .desktop-no-wrap {
        white-space: normal;
    }
}

/* --- 5. Scroll Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 99;
    opacity: 0;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--neon-red);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: #fff;
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
}

/* --- 6. Tech Stack --- */
.tech-stack {
    padding: 60px 0;
}

.tech-label {
    font-size: clamp(2rem, 6vw, 3rem);
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    color: var(--neon-red);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.tech-subtitle {
    font-family: 'JetBrains Mono';
    color: var(--text-dim);
    font-size: 1rem;
    margin-bottom: 40px;
}

.category-title {
    color: var(--text-mid);
    font-family: 'JetBrains Mono', monospace;
}

.tech-item {
    padding: 10px 14px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.tech-item:hover {
    background: rgba(255, 0, 0, 0.04);
    border-color: var(--neon-red);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.15), inset 0 0 10px rgba(255, 0, 0, 0.05);
    transform: translateX(8px);
}

.tech-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* --- 7. Project Styles --- */
section {
    scroll-margin-top: 100px;
}

.project-img-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #2a2a30;
    /* Fallback color */
}

.project-img {
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    filter: grayscale(40%);
}

.project-img-container:hover .project-img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--neon-red);
    transform: translateX(-101%);
    z-index: 2;
}

.project-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--text-main);
}

.project-desc {
    color: var(--text-dim);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* --- Technology Tags/Pills --- */
.exp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.exp-tags span {
    background: rgba(220, 53, 69, 0.1); /* Light red tint */
    color: var(--text-mid);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid rgba(220, 53, 69, 0.2);
    transition: all 0.3s ease;
}

.exp-tags span:hover {
    background: var(--neon-red);
    color: white;
    border-color: var(--neon-red);
    transform: translateY(-2px);
}

/* Hide for GSAP Entrance */
.project-img-wrapper,
.project-content {
    opacity: 0;
}

.tech-badge {
    display: inline-block;
    color: var(--neon-red);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 1px;
    border-left: 2px solid var(--neon-red);
    padding-left: 10px;
}

/* --- 8. Notable Projects Specific Styles --- */
.other-project-label {
    font-size: clamp(2rem, 2vw, 3rem);
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    color: var(--neon-red);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.notable-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 12px;
    min-height: 220px;
    transition: all 0.3s ease;
}

.notable-card:hover {
    border-color: var(--neon-red);
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.notable-card h5 {
    color: var(--text-main);
    font-size: 1.1rem;
}

.notable-card .text-dim {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* --- 9. About Section --- */
.stat-card, .hobbies-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--neon-red);
    transform: translateY(-5px);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--neon-red);
    font-family: 'JetBrains Mono', monospace;
}

.stat-label {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.hobbies-card {
    text-align: left;
}

.text-mid {
    color: var(--text-mid);
}

/* Hide for Animation */
.about-text, .stat-card, .hobbies-card {
    opacity: 0;
}

/* --- 10. Contact Section --- */
.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.icon-box {
    width: 50px;
    height: 50px;
    background: rgba(220, 53, 69, 0.1);
    color: var(--neon-red);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: 0.3s;
}

.contact-item:hover .icon-box {
    background: var(--neon-red);
    color: white;
    transform: rotate(-10deg);
}

.custom-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    padding: 12px 15px;
}

.custom-input:focus {
    border-color: var(--neon-red) !important;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.2) !important;
    outline: none;
}

.custom-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1;
}

/* For Animation */
.contact-info, .contact-card {
    opacity: 0;
}

/* --- 11. Footer Section --- */
.footer-section {
    background: transparent;
}

.text-main {
    color: var(--neon-red);
    letter-spacing: 1px;
}

.text-dim {
    color: #a0a0a0;
}

/* Optional: subtle divider color */
hr.border-secondary {
    border-color: rgba(255, 255, 255, 0.1) !important;
}