* {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #000000;
    color: #FFFFFF;
    width: 100%;
    overflow-x: hidden;
    position: relative;
    padding-top: 0;
}

/* Add cyberpunk circuit pattern */
#header {
    width: 100%;
    min-height: 60vh;
    position: relative;
    overflow: hidden;
    background: linear-gradient(
        135deg,
        #000033,
        #1a0b2e,
        #261447,
        #3d1d6c,
        #261447,
        #000033
    );
    background-size: 100% 100%;
    animation: workGradient 15s ease infinite;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

#header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, rgba(100, 0, 255, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(100, 0, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.1;
}

#work {
    width: 100%;
    min-height: 100vh;
    padding: -150px -100;
    position: relative;
    background: linear-gradient(45deg, #000000, #1a1a2e);
    overflow: hidden;
}

#work::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 20%, rgba(0, 195, 255, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 70% 60%, rgba(0, 195, 255, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 40% 80%, rgba(0, 195, 255, 0.1) 0%, transparent 25%);
    opacity: 0.5;
    z-index: 0;
}

#work::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0, 195, 255, 0.05) 10px,
        rgba(0, 195, 255, 0.05) 20px
    );
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
}

/* Navigation Styles */
.nav-wrapper {
    width: 100%;
    padding: clamp(8px, 1.5vh, 15px) clamp(15px, 3vw, 30px);
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.logo {
    width: clamp(150px, 18vw, 250px);
    cursor: pointer;
}

.nav-ribbon {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: clamp(15px, 2vw, 30px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-links li a {
    color: #fff;
    text-decoration: none;
    font-size: clamp(14px, 1.5vw, 16px);
    position: relative;
    transition: all 0.3s ease;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: #00ffff;
}

.nav-links li a::after {
    content: '';
    width: 0;
    height: 2px;
    background: #00ffff;
    position: absolute;
    left: 0;
    bottom: -6px;
    transition: width 0.3s ease;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

.menu-icon {
    display: none;
    cursor: pointer;
}

.dots {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dots span {
    display: block;
    width: 5px;
    height: 5px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn {
    display: none;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1002;
}

.close-icon {
    position: relative;
    width: 24px;
    height: 24px;
}

.close-icon span {
    position: absolute;
    width: 100%;
    height: 2px;
    background: #fff;
    top: 50%;
    left: 0;
    transition: all 0.3s ease;
}

.close-icon span:first-child {
    transform: rotate(45deg);
}

.close-icon span:last-child {
    transform: rotate(-45deg);
}

/* Responsive Navigation */
@media screen and (max-width: 1230px) {
    .nav-ribbon {
        position: fixed;
        top: 0;
        right: -250px;
        width: 250px;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        padding: 20px calc(15px + 1vw);
        transition: all 0.3s ease;
        z-index: 1001;
        display: flex;
        flex-direction: column;
    }

    .nav-ribbon.active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        gap: clamp(12px, 2vh, 25px);
        margin-top: 40px;
        padding: 0;
    }

    .nav-links li {
        width: 100%;
        opacity: 0;
        transform: translateX(50px);
        transition: all 0.3s ease;
    }

    .nav-ribbon.active .nav-links li {
        opacity: 1;
        transform: translateX(0);
        transition-delay: calc(0.1s * var(--i));
    }

    .nav-links li a {
        display: block;
        width: 100%;
        padding: clamp(10px, 2vh, 20px) clamp(15px, 3vw, 25px);
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
    }

    .menu-icon {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
    }

    .close-btn {
        display: block;
    }
}

.work-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 40px;
    margin-top: 50px;
}

.my-work {
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.my-work:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(100, 0, 255, 0.3);
    border-color: rgba(100, 0, 255, 0.3);
}

.my-work img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    transition: all 0.4s ease;
}

.my-work:hover img {
    transform: scale(1.05);
}

.layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(
        transparent,
        rgba(0, 0, 0, 0.8) 20%,
        rgba(100, 0, 255, 0.3)
    );
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    transition: height 0.5s ease;
}

.my-work:hover .layer {
    height: 100%;
}

.layer h3 {
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
    font-size: 20px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease;
}

.my-work:hover .layer h3 {
    transform: translateY(0);
    opacity: 1;
}

.layer p {
    color: #fff;
    font-size: 14px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease 0.1s;
}

.my-work:hover .layer p {
    transform: translateY(0);
    opacity: 1;
}

.layer a {
    margin-top: 20px;
    color: #ff004f;
    text-decoration: none;
    font-size: 18px;
    line-height: 60px;
    background: rgba(255, 255, 255, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease 0.2s;
}

.my-work:hover .layer a {
    transform: translateY(0);
    opacity: 1;
}

.layer a:hover {
    background: rgba(100, 0, 255, 0.3);
    border-color: #fff;
    box-shadow: 0 0 20px rgba(100, 0, 255, 0.5);
    color: #fff;
}

/* Add glowing effect to certificates */
@keyframes glow {
    0% {
        box-shadow: 0 0 20px rgba(100, 0, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(100, 0, 255, 0.5);
    }
    100% {
        box-shadow: 0 0 20px rgba(100, 0, 255, 0.3);
    }
}

.my-work::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #6a11cb, #2575fc);
    z-index: -1;
    border-radius: 16px;
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.my-work:hover::before {
    opacity: 1;
    animation: glow 2s infinite;
}

.header-text {
    margin-top: 20%;
    font-size: 30px;
    text-align: center;
}

#accomplishment-typewriter {
    font-size: 60px;
    font-weight: 600;
    color: #fff;
    position: relative;
}

#accomplishment-typewriter::after {
    content: '|';
    position: absolute;
    right: -8px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .work-list {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        grid-gap: 20px;
    }
    
    .my-work img {
        height: 250px;
    }
    
    .layer h3 {
        font-size: 18px;
    }
    
    .layer p {
        font-size: 12px;
    }
    
    .layer a {
        width: 50px;
        height: 50px;
        line-height: 50px;
    }
}

@media only screen and (max-width: 600px){
    #header {
        width: 100%;
        height: 60vh;
        background: linear-gradient(
            135deg,
            #000033,
            #1a0b2e,
            #261447,
            #3d1d6c,
            #261447,
            #000033
        );
        background-size: 100% 100%;
        animation: workGradient 15s ease infinite;
    }

    .work-list{
        display: grid;
        grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
        grid-gap: 40px;
        margin-top: 50px;
    }
    
    .my-work{
       border-radius: 10px;
       position: relative;
       overflow: hidden;
    }
    
    .my-work img{
        width: 100%;
        border-radius: 10px;
        display: block;
        transition: transform 0.3s;
    }
}

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