/* ===== VARIABLES ===== */
:root {
    --white: #fff;
    --black: #050505;
    --gray-light: #f5f5f7;
    --accent: linear-gradient(135deg, #4cc9f0 0%, #4361ee 100%);
    --accent-dark: linear-gradient(135deg, #3a0ca3 0%, #4361ee 100%);
    --neon: #4cc9f0;
    --radius-lg: 24px;
    --radius: 12px;
    --transition: .33s cubic-bezier(.65, 0, .34, 1);
    --font-main: 'Space Grotesk', sans-serif;
    --font-title: 'Montserrat', serif;
    --nav-height: 80px;
    --hero-img-size: 220px;
    --section-pad: 6vw;
    --max-width: 1160px;
}

/* ===== BASE & LAYOUT ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--gray-light);
    background-color: #0a0a0a;
    /* Dark background only */
    overflow-x: hidden;
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100vw;
}

html {
    overflow-x: hidden;
    max-width: 100vw;
}

/* ===== ANIMATED BACKGROUND SHAPES ===== */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
    /* Smooth dark gradient */
    background-size: 400% 400%;
    animation: bgGradient 15s ease infinite;
}

@keyframes bgGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.1;
    filter: blur(20px);
    animation: float 15s infinite ease-in-out;
    transition: background 0.5s ease;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    bottom: 15%;
    right: 10%;
    animation-delay: -5s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    top: 40%;
    right: 20%;
    animation-delay: -10s;
}

.shape-4 {
    width: 180px;
    height: 180px;
    bottom: 30%;
    left: 15%;
    animation-delay: -12s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(20px, 20px) rotate(10deg);
    }

    50% {
        transform: translate(0, 40px) rotate(0deg);
    }

    75% {
        transform: translate(-20px, 20px) rotate(-10deg);
    }
}

/* ===== PRELOADER (ULTRA LUXURY 3D HOLOGRAPHIC) ===== */
#preloader {
    background: #020202;
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

.preloader-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(76, 201, 240, 0.08) 0%, transparent 70%);
}

.preloader-particles {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 20% 30%, #fff 100%, transparent 0),
        radial-gradient(1px 1px at 40% 70%, #4cc9f0 100%, transparent 0),
        radial-gradient(1px 1px at 50% 10%, #fff 100%, transparent 0),
        radial-gradient(1.5px 1.5px at 80% 40%, #4cc9f0 100%, transparent 0),
        radial-gradient(1px 1px at 90% 80%, #fff 100%, transparent 0);
    background-size: 200px 200px;
    opacity: 0.15;
    animation: particlesMove 20s linear infinite;
}

@keyframes particlesMove {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-200px);
    }
}

.preloader-3d-scene {
    perspective: 2000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
}

.glass-plate-system {
    position: relative;
    transform-style: preserve-3d;
    animation: floatingPlateSystem 8s ease-in-out infinite;
}

.glass-plate {
    position: relative;
    width: 260px;
    height: 150px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    box-shadow:
        0 50px 100px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(76, 201, 240, 0.05);
}

.plate-hologram {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 45%,
            rgba(76, 201, 240, 0.2) 50%,
            rgba(255, 255, 255, 0.1) 55%,
            transparent 100%);
    background-size: 250% 250%;
    animation: holographicShine 4s linear infinite;
    pointer-events: none;
}

.plate-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transform-style: preserve-3d;
    transform: translateZ(60px);
}

.plate-initials {
    font-size: 4.5rem;
    font-weight: 800;
    font-family: var(--font-title);
    background: linear-gradient(to bottom, #fff, #bbb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.05em;
    text-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.plate-symbol {
    font-size: 2.5rem;
    font-weight: 300;
    color: #4cc9f0;
    opacity: 0.8;
    text-shadow: 0 0 20px rgba(76, 201, 240, 0.6);
}

/* 3D Shards */
.shard {
    position: absolute;
    font-family: var(--font-title);
    color: rgba(76, 201, 240, 0.4);
    font-weight: 800;
    pointer-events: none;
    animation: shardOrbit 10s linear infinite;
}

.shard-1 {
    top: -20px;
    left: -40px;
    font-size: 1.5rem;
    animation-duration: 12s;
}

.shard-2 {
    bottom: -20px;
    right: -40px;
    font-size: 1.2rem;
    animation-duration: 15s;
}

.shard-3 {
    top: 50%;
    right: -60px;
    font-size: 1.8rem;
    animation-duration: 9s;
}

.shard-4 {
    bottom: 20%;
    left: -70px;
    font-size: 2rem;
    animation-duration: 18s;
}

@keyframes shardOrbit {
    0% {
        transform: rotateY(0) translateZ(100px) rotateX(0);
        opacity: 0;
    }

    20% {
        opacity: 0.6;
    }

    80% {
        opacity: 0.6;
    }

    100% {
        transform: rotateY(360deg) translateZ(120px) rotateX(360deg);
        opacity: 0;
    }
}

.preloader-lux-text {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.lux-line {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2));
}

.lux-line:last-child {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent);
}

.lux-brand {
    font-family: var(--font-title);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0.6;
    animation: textBreathing 3s ease-in-out infinite alternate;
}

.minimal-loader {
    display: flex;
    gap: 15px;
}

.minimal-loader span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4cc9f0;
    opacity: 0.2;
    animation: luxDot 1.4s infinite ease-in-out both;
}

.minimal-loader span:nth-child(2) {
    animation-delay: 0.2s;
}

.minimal-loader span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes floatingPlateSystem {

    0%,
    100% {
        transform: rotateY(-18deg) rotateX(12deg) translateY(0);
    }

    50% {
        transform: rotateY(18deg) rotateX(-12deg) translateY(-30px);
    }
}

@keyframes holographicShine {
    0% {
        background-position: -150% -150%;
    }

    100% {
        background-position: 150% 150%;
    }
}

@keyframes textBreathing {
    from {
        opacity: 0.3;
        filter: blur(1px);
    }

    to {
        opacity: 0.8;
        filter: blur(0px);
    }
}

@keyframes luxDot {

    0%,
    80%,
    100% {
        transform: scale(0.5);
        opacity: 0.1;
    }

    40% {
        transform: scale(2.5);
        opacity: 1;
        box-shadow: 0 0 15px #4cc9f0;
    }
}

.minimal-loader {
    display: flex;
    gap: 12px;
}

.minimal-loader span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4cc9f0;
    opacity: 0.2;
    animation: miniDot 1.4s infinite ease-in-out both;
}

.minimal-loader span:nth-child(2) {
    animation-delay: 0.2s;
}

.minimal-loader span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes floatPlate {

    0%,
    100% {
        transform: rotateY(-15deg) rotateX(10deg) translateY(0);
    }

    50% {
        transform: rotateY(15deg) rotateX(-10deg) translateY(-20px);
    }
}

@keyframes breathingPlateGlow {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.9);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

@keyframes fadeText {
    from {
        opacity: 0.2;
    }

    to {
        opacity: 0.5;
    }
}

@keyframes miniDot {

    0%,
    80%,
    100% {
        transform: scale(0.5);
        opacity: 0.1;
    }

    40% {
        transform: scale(2);
        opacity: 1;
        box-shadow: 0 0 10px #4cc9f0;
    }
}

/* ===== NAVIGATION ===== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(76, 201, 240, 0.12);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(76, 201, 240, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 7vw;
    height: var(--nav-height);
    transition: all 0.3s ease;
    max-width: 100vw;
    overflow-x: hidden;
}

nav::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(76, 201, 240, 0.03), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

nav:hover::before {
    opacity: 1;
}

nav:hover {
    background: rgba(15, 15, 15, 0.6);
    border-bottom-color: rgba(76, 201, 240, 0.2);
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.4),
        0 0 25px rgba(76, 201, 240, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.logo {
    font-family: var(--font-title);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-glass-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(15, 15, 15, 0.3);
    border: 1px solid rgba(76, 201, 240, 0.2);
    border-radius: 14px;
    padding: 0.7rem 1.2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 0 20px rgba(76, 201, 240, 0.15),
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-glass-logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(76, 201, 240, 0.1), transparent);
    transition: left 0.6s;
}

.nav-glass-logo:hover::before {
    left: 100%;
}

.nav-glass-logo:hover {
    background: rgba(20, 20, 20, 0.4);
    border-color: rgba(76, 201, 240, 0.5);
    box-shadow:
        0 0 30px rgba(76, 201, 240, 0.3),
        0 0 50px rgba(76, 201, 240, 0.15),
        0 8px 25px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.logo-letters {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.1em;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 20px rgba(76, 201, 240, 0.3),
        0 2px 10px rgba(0, 0, 0, 0.5);
}

.logo-bracket {
    font-size: 1.8rem;
    font-weight: 400;
    color: #4cc9f0;
    text-shadow:
        0 0 10px rgba(76, 201, 240, 0.8),
        0 0 20px rgba(76, 201, 240, 0.5),
        0 0 30px rgba(76, 201, 240, 0.3);
    transition: all 0.3s ease;
}

.nav-glass-logo:hover .logo-bracket {
    color: #5dd9ff;
    text-shadow:
        0 0 15px rgba(76, 201, 240, 1),
        0 0 30px rgba(76, 201, 240, 0.7),
        0 0 45px rgba(76, 201, 240, 0.4);
}

.logo .mono {
    background: var(--accent-dark);
    color: #fff;
    border-radius: .6em;
    padding: .04em .41em;
    transition: background 0.3s ease;
}

nav ul {
    display: flex;
    gap: 2.2rem;
    list-style: none;
}

nav .nav-link {
    font-size: 1.09rem;
    color: #aaa;
    font-weight: 600;
    position: relative;
    padding-bottom: .13em;
    font-family: var(--font-main);
    transition: color .18s;
    text-decoration: none;
}

nav .nav-link.active,
nav .nav-link:hover {
    color: #fff;
}

nav .nav-link.active::after,
nav .nav-link:hover::after {
    content: "";
    display: block;
    height: 2.5px;
    width: 80%;
    margin: .17em auto 0;
    background: var(--accent);
    border-radius: 2px;
}

/* ===== SECTIONS ===== */
.parallax-section {
    padding: calc(var(--section-pad) + 80px) var(--section-pad) var(--section-pad);
    position: relative;
    background-color: #0a0a0a;
    /* Consistent dark background */
    max-width: 100vw;
    overflow-x: hidden;
}

section h2 {
    text-align: center;
    font-size: 2.1rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 2.1em;
    letter-spacing: 0.01em;
    font-family: var(--font-title);
    text-shadow: 0 0 12px rgba(76, 201, 240, 0.2);
    background: var(--accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 5s infinite alternate;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

/* ===== HERO ===== */
header#home {
    padding-top: var(--nav-height);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(120deg, #0a0a0a 60%, #1a1a1a 100%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(76, 201, 240, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.hero-flex {
    display: flex;
    align-items: center;
    gap: 5vw;
    max-width: 100%;
    padding: 0 2rem;
}

.hero-img-container {
    position: relative;
    width: var(--hero-img-size);
    height: var(--hero-img-size);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-3d-wrapper {
    perspective: 1000px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-img {
    transform-style: preserve-3d;
    transition: transform 0.12s ease-out;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 7px solid #4cc9f0;
    /* Neon border */
    background: #eaeaea;
    box-shadow: 0 0 40px 8px rgba(76, 201, 240, 0.2), 0 0 0 8px rgba(255, 255, 255, 0.5);
    transform: rotateX(0) rotateY(0) scale3d(1, 1, 1);
}

.hero-glow {
    position: absolute;
    inset: -15px;
    border-radius: 50%;
    border: 7px solid #4cc9f0;
    box-shadow: 0 0 30px 14px rgba(76, 201, 240, 0.3);
    pointer-events: none;
    animation: glowPulse 3s infinite alternate;
    transition: box-shadow 0.3s ease;
}

@keyframes glowPulse {
    from {
        box-shadow: 0 0 30px 14px rgba(76, 201, 240, 0.2);
    }

    to {
        box-shadow: 0 0 60px 20px rgba(76, 201, 240, 0.6);
    }
}

.hero-info {
    max-width: 600px;
    color: #fff;
}

.typing {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: .07em;
    background: var(--accent);
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    font-family: var(--font-title);
    margin-bottom: .39em;
    min-height: 2.7em;
    text-shadow: 0 0 10px rgba(76, 201, 240, 0.3);
    animation: gradientShift 5s infinite alternate;
}

.neon-text {
    animation: neon-flicker 1.5s infinite alternate;
}

@keyframes neon-flicker {
    from {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px var(--neon), 0 0 20px var(--neon);
    }

    to {
        text-shadow: 0 0 2px #fff, 0 0 5px #fff, 0 0 7px var(--neon), 0 0 10px var(--neon);
    }
}

.hero-info h2 {
    margin-top: 1.08em;
    font-size: 1.1rem;
    font-family: var(--font-main);
    color: #ccc;
    font-weight: 600;
}

.hero-info p {
    margin: 1.1em 0 2.1em 0;
    line-height: 1.73;
    font-size: 1.13rem;
    color: #ddd;
}

.hero-highlight {
    color: #fff;
    background: linear-gradient(90deg, #4cc9f0, #4361ee);
    font-weight: bold;
    padding: 0.13em 0.5em;
    border-radius: 0.8em;
}

.hero-socials {
    display: flex;
    gap: 1.1em;
}

.hero-socials a {
    color: #fff;
    font-size: 1.8rem;
    transition: transform .2s, color .2s;
}

.hero-socials a:hover {
    transform: scale(1.2) rotate(-5deg);
    color: #4cc9f0;
}

.btn {
    display: inline-block;
    margin-top: 1.3em;
    padding: .7em 2.3em;
    font-size: 1.08rem;
    font-weight: 800;
    color: #fff;
    border: none;
    border-radius: 1.5em;
    box-shadow: 0 3px 20px #0001;
    cursor: pointer;
    text-decoration: none;
    transition: background .25s, transform .13s, box-shadow 0.25s ease;
    font-family: var(--font-main);
}

.btn.gradient-btn {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px rgba(76, 201, 240, 0.4);
}

.btn.gradient-btn:hover {
    background: var(--accent-dark);
    color: #fff;
    transform: scale(1.04);
    box-shadow: 0 0 25px rgba(58, 12, 163, 0.6);
}

.scroll-down {
    position: absolute;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
}

.scroll-down span {
    display: block;
    width: 32px;
    height: 48px;
    border: 2.5px solid #4cc9f0;
    border-radius: 20px;
    position: relative;
}

.scroll-down span::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4cc9f0;
    position: absolute;
    left: 50%;
    top: 14px;
    transform: translateX(-50%);
    animation: scrollDownAnim 1.8s infinite;
}

@keyframes scrollDownAnim {
    0% {
        top: 14px;
        opacity: 1;
    }

    80% {
        top: 31px;
        opacity: .14;
    }

    100% {
        top: 14px;
        opacity: 1;
    }
}

/* ===== ABOUT ===== */
#about .about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: #ddd;
}

#about .about-content p {
    margin-bottom: 1.5em;
    line-height: 1.7;
    font-size: 1.1rem;
}

/* ===== SKILLS ===== */
.skills-container {
    display: flex;
    gap: 4em;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.skill-category {
    min-width: 300px;
}

.skill-category h3 {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 1.5em;
    font-family: var(--font-title);
    text-align: center;
}

.skill-bar {
    margin-bottom: 1.5em;
}

.skill-name {
    display: block;
    margin-bottom: 0.5em;
    color: #ccc;
    font-weight: 600;
}

.skill-level {
    height: 10px;
    background: #333;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.3);
}

.level-bar {
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width 2s ease-in-out;
    box-shadow: 0 0 10px rgba(76, 201, 240, 0.5);
}

.level-react {
    background: linear-gradient(90deg, #61DAFB, #1572B6);
}

.level-html {
    background: linear-gradient(90deg, #F16529, #E44D26);
}

.level-css {
    background: linear-gradient(90deg, #3D99F6, #264DE4);
}

.level-js {
    background: linear-gradient(90deg, #F0DB4F, #F7DF1E);
}

.level-node {
    background: linear-gradient(90deg, #68A063, #339933);
}

.level-express {
    background: linear-gradient(90deg, #78DC78, #5CAF50);
}

.level-mongo {
    background: linear-gradient(90deg, #4DB33D, #3FA037);
}

.level-tailwind {
    background: linear-gradient(90deg, #38B2AC, #0694a2);
}

/* ===== PROJECT CATEGORY SECTIONS ===== */
.project-category-section {
    margin-bottom: 6em;
    padding: 0;
}

/* ===== REFINED CATEGORY TITLES ===== */
.category-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 2.5em;
    font-family: var(--font-title);
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    position: relative;
    letter-spacing: 1px;
}

/* Elegant glass accented container for the icon */
.category-title i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #4cc9f0;
    font-size: 1.8rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.category-title:hover i {
    background: rgba(76, 201, 240, 0.15);
    color: #fff;
    border-color: rgba(76, 201, 240, 0.5);
    transform: perspective(1000px) scale(1.1) rotateY(10deg) translateZ(20px);
    box-shadow: 0 15px 35px rgba(76, 201, 240, 0.3);
}

/* Text styling */
.category-title span {
    background: linear-gradient(90deg, #fff, #b0b0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease;
    display: inline-block;
}

.category-title:hover span {
    transform: perspective(1000px) translateZ(30px) translateX(10px);
    filter: brightness(1.2);
}

/* Subtle modern underline */
.category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 75px;
    /* Aligned with text start */
    width: 0;
    height: 2px;
    background: #4cc9f0;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 10px rgba(76, 201, 240, 0.8);
    opacity: 0.8;
}

.category-title:hover::after {
    width: 150px;
}


/* ===== PROJECTS ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
    gap: 2.3em;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== MARQUEE ANIMATION ===== */
.marquee-container {
    overflow: hidden;
    padding: 2em 0;
    width: 100%;
    max-width: 100vw;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.projects-marquee {
    display: flex;
    flex-wrap: nowrap;
    /* Prevent stacking */
    gap: 3em;
    width: max-content;
    padding-right: 3em;
    /* Essential for seamless loop matching the gap */
    animation: marquee 30s linear infinite;
}

.projects-marquee:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-33.3333%);
        /* Resets naturally at the end of the first set */
    }
}

.projects-marquee .project-card {
    flex: 0 0 min(380px, 85vw) !important;
    /* Force uniform width but responsive */
    width: min(380px, 85vw) !important;
    animation: none !important;
    /* Disable entrance animation for marquee */
    opacity: 1 !important;
    margin: 0 !important;
}

.project-card {
    background: rgba(40, 40, 40, 0.7);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
    border: 1px solid #333;
    opacity: 0;
    animation: slideInFromRight 1s ease-out forwards;
}

/* Beautiful RTL slide-in animation */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Staggered delays for each card */
.project-card:nth-child(1) {
    animation-delay: 0.2s;
}

.project-card:nth-child(2) {
    animation-delay: 0.4s;
}

.project-card:nth-child(3) {
    animation-delay: 0.6s;
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(76, 201, 240, 0.3);
    border-color: #4cc9f0;
}

/* Projects background decoration */
#projects {
    position: relative;
    overflow: hidden;
}

#projects::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(76, 201, 240, 0.1) 0%, transparent 70%);
    top: 10%;
    right: -100px;
    z-index: 0;
    pointer-events: none;
}

#projects::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(67, 97, 238, 0.08) 0%, transparent 70%);
    bottom: 5%;
    left: -150px;
    z-index: 0;
    pointer-events: none;
}

.project-tech i {
    font-size: 1.2rem;
    margin-right: 8px;
    transition: color 0.3s ease;
}

.project-card:hover .project-tech i {
    color: #4cc9f0;
}

/* ===== PREMIUM COMPACT PROJECT CARDS ===== */
.project-card.compact {
    background: linear-gradient(145deg, rgba(35, 35, 45, 0.95), rgba(25, 25, 35, 0.98));
    backdrop-filter: blur(20px);
    border: 1.5px solid rgba(76, 201, 240, 0.15);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

/* Glowing border effect on hover */
.project-card.compact::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #4cc9f0, #4361ee, #3a0ca3, #4cc9f0);
    background-size: 300% 300%;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
    animation: borderGlow 3s ease infinite;
}

.project-card.compact:hover::before {
    opacity: 0.6;
}

@keyframes borderGlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.project-card.compact:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(76, 201, 240, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(76, 201, 240, 0.6);
}

.project-card.compact .project-image {
    height: 180px;
    position: relative;
    overflow: hidden;
    background: #1a1a1a;
}

/* Premium gradient overlay on images */
.project-card.compact .project-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(76, 201, 240, 0.1) 0%,
            rgba(0, 0, 0, 0.3) 50%,
            rgba(0, 0, 0, 0.9) 100%);
    opacity: 0.9;
    transition: opacity 0.4s ease;
}

.project-card.compact:hover .project-image::after {
    opacity: 0.5;
}

/* Shine effect on hover */
.project-card.compact .project-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg,
            transparent 30%,
            rgba(255, 255, 255, 0.3) 50%,
            transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.project-card.compact:hover .project-image::before {
    transform: translateX(100%);
}

.project-card.compact .project-body {
    padding: 1.5em;
    background: linear-gradient(180deg,
            rgba(15, 15, 20, 0.7) 0%,
            rgba(20, 20, 28, 0.9) 100%);
    position: relative;
    z-index: 1;
}

.project-card.compact .project-body h4 {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 900;
    margin-bottom: 0.7em;
    font-family: var(--font-title);
    letter-spacing: 0.03em;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.5),
        0 0 10px rgba(76, 201, 240, 0.2);
    transition: all 0.3s ease;
    line-height: 1.3;
}

.project-card.compact:hover .project-body h4 {
    color: #4cc9f0;
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(76, 201, 240, 0.6);
    transform: translateX(5px);
}

.project-card.compact .project-body p {
    color: #bbb;
    font-size: 0.92rem;
    margin-bottom: 1.2em;
    line-height: 1.6;
    font-weight: 400;
    transition: color 0.3s ease;
}

.project-card.compact:hover .project-body p {
    color: #e0e0e0;
}

.project-card.compact .project-tech {
    display: flex;
    gap: 1em;
    font-size: 1.4rem;
    padding-top: 0.8em;
    border-top: 1px solid rgba(76, 201, 240, 0.15);
    justify-content: center;
}

.project-card.compact .project-tech i {
    color: #4cc9f0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 0 8px rgba(76, 201, 240, 0.4));
    cursor: pointer;
}

.project-card.compact:hover .project-tech i {
    transform: translateY(-5px) rotate(10deg) scale(1.2);
    filter: drop-shadow(0 0 15px rgba(76, 201, 240, 0.8));
}

.project-card.compact .project-tech i:nth-child(1) {
    transition-delay: 0s;
}

.project-card.compact .project-tech i:nth-child(2) {
    transition-delay: 0.05s;
}

.project-card.compact .project-tech i:nth-child(3) {
    transition-delay: 0.1s;
}

/* ===== CLICKABLE IMAGE OVERLAY ===== */
.project-image-link {
    display: block;
    text-decoration: none;
    position: relative;
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.image-overlay i {
    font-size: 2.5rem;
    color: #4cc9f0;
    transform: translateY(20px) scale(0.5);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 0 15px rgba(76, 201, 240, 0.8));
}

.image-overlay span {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-title);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.project-card.compact:hover .image-overlay {
    opacity: 1;
}

.project-card.compact:hover .image-overlay i {
    transform: translateY(0) scale(1) rotate(360deg);
}

.project-card.compact:hover .image-overlay span {
    transform: translateY(0);
    opacity: 1;
}

.project-visual {
    height: 180px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.4s ease;
}

.project-visual i:not(.fas.fa-external-link-alt) {
    z-index: 2;
    font-size: 4rem;
    /* Ensure large icon size */
    display: block;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
    animation: floatingIcon 4s ease-in-out infinite;
}

@keyframes floatingIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Specific Project Gradients */
.visual-brazely {
    background: linear-gradient(135deg, #1a1a1a, #c5a059);
    /* Gold/Dark for luxury */
}

.visual-bondok {
    background: linear-gradient(135deg, #1e3c72, #2a5298, #ff4e50);
    /* Creative blue/red */
}

.visual-flower {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    /* Fresh green */
}

.visual-basbosa {
    background: linear-gradient(135deg, #ff9966, #ff5e62);
    /* Warm orange/red */
}

.visual-shopery {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    /* Lush organic green */
}

.visual-default {
    background: linear-gradient(135deg, #4361ee, #4cc9f0);
}

.project-card.compact .image-overlay {
    z-index: 10;
}

/* Updating image-overlay to work with visuals */
.project-image {
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.project-overlay-link {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    color: #fff;
    font-size: 2rem;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 50%;
    z-index: 3;
}

.project-card:hover .project-overlay-link {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.project-body {
    padding: 1.1em;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-body h3 {
    color: #fff;
    font-size: 1.13rem;
    font-weight: 800;
    margin-bottom: .5em;
    font-family: var(--font-main);
}

.project-body p {
    color: #ccc;
    font-size: 1.02rem;
    margin-bottom: .82em;
    min-height: 44px;
}

.project-tech {
    display: flex;
    gap: 0.5em;
    margin-bottom: 1em;
    color: #aaa;
    flex-wrap: wrap;
}

.project-tech i {
    color: #4cc9f0;
}

.project-links {
    margin-top: auto;
    display: flex;
    gap: .7em;
}

.btn.btn-outline {
    background: transparent;
    color: #4cc9f0;
    border: 2px solid #4cc9f0;
    box-shadow: 0 0 10px rgba(76, 201, 240, 0.2);
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.btn.btn-outline:hover {
    background: #4cc9f0;
    color: #000;
}

.btn.btn-primary {
    background: #4cc9f0;
    color: #000;
    box-shadow: 0 0 10px rgba(76, 201, 240, 0.4);
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.btn.btn-primary:hover {
    background: #000;
    color: #4cc9f0;
    border-color: #4cc9f0;
    box-shadow: 0 0 20px rgba(76, 201, 240, 0.6);
}

/* ===== CONTACT ===== */
.contact-container {
    display: flex;
    gap: 4em;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.contact-form-container {
    flex: 1;
    min-width: 300px;
}

#contact form {
    display: flex;
    flex-direction: column;
    gap: 1.15em;
}

#contact input,
#contact textarea {
    background: rgba(40, 40, 40, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid #444;
    color: #fff;
    border-radius: 11px;
    padding: 1.12em 1.2em;
    font-size: 1.08em;
    outline: none;
    transition: border .19s, box-shadow .19s;
    font-family: var(--font-main);
}

#contact input:focus,
#contact textarea:focus {
    border-color: #4cc9f0;
    box-shadow: 0 0 15px rgba(76, 201, 240, 0.3);
}

#contact textarea {
    min-height: 120px;
    resize: vertical;
}

#contact .form-message {
    min-height: 26px;
    color: #4cc9f0;
    font-weight: 700;
    font-size: 1.1em;
    margin-top: -.67em;
}

.contact-info {
    flex: 1;
    min-width: 250px;
    color: #ddd;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5em;
    color: #fff;
}

.contact-info p {
    margin-bottom: 1em;
    font-size: 1.1rem;
}

.contact-info a {
    color: #4cc9f0;
    text-decoration: none;
    transition: color .2s;
}

.contact-info a:hover {
    color: #fff;
}

footer {
    text-align: center;
    padding: 2em 0 1.2em 0;
    color: #aaa;
    font-size: 1.09rem;
    margin-top: 45px;
    background: #0a0a0a;
    border-top: 1px solid #333;
}

footer p {
    font-family: var(--font-main);
}

footer i {
    color: #e74c3c;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 1024px) {
    :root {
        --section-pad: 8vw;
    }

    .hero-flex {
        gap: 3vw;
    }

    .category-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 980px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .skills-container {
        gap: 3rem;
    }
}

@media (max-width: 800px) {
    :root {
        --nav-height: 70px;
    }

    .hero-flex {
        flex-direction: column;
        gap: 2.5em;
        padding-top: 2rem;
    }

    .hero-info {
        text-align: center;
        max-width: 100%;
        padding: 0 1rem;
    }

    .hero-info h1.typing {
        font-size: 2rem;
        min-height: auto;
        /* Allow height to adjust */
        margin-bottom: 0.5em;
    }

    .hero-info h2 {
        font-size: 1.1rem;
    }

    .hero-socials {
        justify-content: center;
        margin-bottom: 2.5rem;
        /* Added space between socials and button */
    }

    .hero-img-container {
        width: 180px;
        height: 180px;
        margin: 0 auto;
    }

    .skills-container {
        flex-direction: column;
        align-items: center;
    }

    .skill-category {
        width: 100%;
        max-width: 500px;
    }

    .contact-container {
        flex-direction: column;
        align-items: center;
    }

    .contact-info {
        text-align: center;
        order: -1;
        /* Move contact info above form on mobile */
        margin-bottom: 2rem;
    }
}

@media (max-width: 650px) {
    nav {
        flex-direction: column;
        gap: 1em;
        padding: 1rem;
        height: auto;
        background: rgba(10, 10, 10, 0.95);
        /* More solid background for readability */
    }

    nav ul {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav .nav-link {
        font-size: 0.95rem;
    }

    .logo {
        transform: scale(0.9);
    }

    header#home {
        padding-top: 140px;
        /* Increased to account for taller nav */
        padding-bottom: 4rem;
        min-height: auto;
        /* Remove 100vh constraint to prevent overlap */
    }

    .hero-img-container {
        width: 150px;
        height: 150px;
    }

    section {
        padding: 4rem 0;
    }

    section>h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5em;
    }

    .category-title {
        font-size: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .category-title i {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .category-title::after {
        left: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.2rem;
    }

    .hero-info h1.typing {
        font-size: 1.6rem;
        letter-spacing: 0.02em;
    }

    .hero-info p {
        font-size: 1rem;
    }

    .btn {
        padding: 0.6em 1.8em;
        font-size: 0.95rem;
        width: 100%;
        /* Full width button on small screens */
        max-width: 280px;
    }

    .project-card.compact {
        margin: 0 1rem;
    }

    .projects-marquee .project-card {
        width: min(300px, 90vw) !important;
        flex: 0 0 min(300px, 90vw) !important;
    }

    .marquee-container {
        padding: 2em 0.5rem;
    }
}

/* ===== RESUME SECTION ===== */
.resume-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

.resume-col {
    flex: 1;
    min-width: 300px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(76, 201, 240, 0.1);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.resume-col:hover {
    transform: translateY(-5px);
    border-color: rgba(76, 201, 240, 0.3);
}

.resume-col h3 {
    font-size: 1.8rem;
    color: var(--neon);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--font-title);
    border-bottom: 1px solid rgba(76, 201, 240, 0.1);
    padding-bottom: 1rem;
}

.resume-item {
    margin-bottom: 2rem;
}

.resume-item:last-child {
    margin-bottom: 0;
}

.resume-item h4 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.resume-item h5 {
    font-size: 0.95rem;
    color: #aaa;
    margin-bottom: 1rem;
    font-weight: 400;
}

.resume-item h5 span {
    color: var(--neon);
    font-weight: 600;
}

.resume-item ul {
    list-style: none;
    padding-left: 0;
}

.resume-item ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    line-height: 1.6;
    font-size: 0.95rem;
    color: var(--gray-light);
}

.resume-item ul li::before {
    content: "▹";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--neon);
    font-weight: 900;
    font-size: 1.1rem;
}