* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #e8ecfc 0%, #d4c5f9 100%);
    color: #2c3e50;
    line-height: 1.8;
    min-height: 100vh;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.nav-brand {
    font-size: 1.8em;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-menu li a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-menu li a:hover::before,
.nav-menu li a.active::before {
    width: 80%;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

header#top1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 80px 20px 60px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    margin-top: 70px;
}

header#top1::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

header#top1 h1 {
    font-size: 3em;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

header#top1 p {
    font-size: 1.2em;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    font-weight: 300;
    animation: fadeInUp 1s ease 0.3s both;
}

section {
    max-width: 1000px;
    margin: 40px auto;
    padding: 35px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

section h2 {
    color: #667eea;
    margin-bottom: 25px;
    font-size: 2.2em;
    font-weight: 700;
    border-bottom: 3px solid #667eea;
    padding-bottom: 12px;
    display: inline-block;
    position: relative;
    animation: slideInLeft 0.6s ease;
}

@keyframes slideInLeft {
    from { 
        opacity: 0;
        transform: translateX(-30px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50%;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    animation: expandWidth 0.8s ease 0.3s both;
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 50%; }
}

.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.profile-img {
    max-width: 320px;
    min-width: 280px;
    border-radius: 15px;
    border: 4px solid #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: float 3s ease-in-out infinite;
    order: 1;
    flex-shrink: 0;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.profile-img:hover {
    transform: scale(1.08) rotate(2deg);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
    animation: none;
}

.about-content p {
    flex: 1;
    order: 2;
    min-width: 300px;
}

p, ul {
    font-size: 1.05em;
    color: #555;
    line-height: 1.8;
}

/* --- BULLET POINTS STYLING --- */
ul {
    list-style-type: none;
    padding-left: 0;
}

ul li {
    margin: 10px 0;
    padding-left: 25px;
    position: relative;
    transition: transform 0.2s ease, color 0.2s ease;
    animation: fadeInList 0.5s ease both;
}

@keyframes fadeInList {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

ul li:nth-child(1) { animation-delay: 0.1s; }
ul li:nth-child(2) { animation-delay: 0.2s; }
ul li:nth-child(3) { animation-delay: 0.3s; }
ul li:nth-child(4) { animation-delay: 0.4s; }
ul li:nth-child(5) { animation-delay: 0.5s; }
ul li:nth-child(6) { animation-delay: 0.6s; }
ul li:nth-child(7) { animation-delay: 0.7s; }

ul li:hover {
    transform: translateX(5px);
    color: #667eea;
}

ul li:before {
    content: "▹";
    position: absolute;
    left: 0;
    color: #667eea;
    font-size: 1.3em;
    font-weight: bold;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(3px); }
}

ul li:hover:before {
    animation: none;
    color: #764ba2;
}
/* ----------------------------------------------------------- */

/* Skills List Formatting */
.skills-list h3 {
    color: #764ba2;
    font-size: 1.3em;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 600;
    padding-left: 10px;
    border-left: 4px solid #667eea;
    animation: slideInRight 0.6s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.skills-list ul {
    margin-bottom: 20px;
}

.skills-list p {
    font-size: 1em;
    margin-left: 10px;
}

/* Quick Links Section */
.quick-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.link-button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.link-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.link-button:hover::before {
    width: 300px;
    height: 300px;
}

.link-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.link-button::after {
    display: none;
}


/* Projects and Technical Details Styling */
.project-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.project-item {
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-left: 5px solid #667eea;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease both;
    cursor: pointer;
}

.project-item:nth-child(1) { animation-delay: 0.1s; }
.project-item:nth-child(2) { animation-delay: 0.2s; }
.project-item:nth-child(3) { animation-delay: 0.3s; }
.project-item:nth-child(4) { animation-delay: 0.4s; }
.project-item:nth-child(5) { animation-delay: 0.5s; }
.project-item:nth-child(6) { animation-delay: 0.6s; }

.project-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, transparent 100%);
    transition: width 0.3s ease;
}

.project-item:hover::before {
    width: 100%;
}

.project-item:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    border-left-width: 8px;
}

.project-item h3 {
    color: #2c3e50;
    font-size: 1.4em;
    margin-bottom: 0;
    font-weight: 700;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.project-item:hover h3 {
    color: #667eea;
}

.toggle-icon {
    font-size: 0.8em;
    color: #667eea;
    transition: transform 0.3s ease;
    display: inline-block;
    margin-left: 10px;
}

.project-item.active .toggle-icon {
    transform: rotate(180deg);
}

.project-description {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin-top 0.4s ease, opacity 0.3s ease;
    opacity: 0;
    position: relative;
    z-index: 1;
}

.project-item.active .project-description {
    max-height: 1000px;
    margin-top: 15px;
    opacity: 1;
}

.project-description p {
    font-size: 1.05em;
    color: #555;
    line-height: 1.7;
}


a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

a:hover {
    color: #764ba2;
}

/* Footer Styling */
.project-footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

.project-footer a {
    font-size: 1.2em;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.project-footer a:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        right: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        z-index: 999;
    }

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

    .hamburger {
        display: flex;
    }

    header#top1 {
        padding: 60px 20px 40px;
    }
    
    header#top1 h1 {
        font-size: 1.8em;
    }

    header#top1 p {
        font-size: 1em;
    }
    
    section {
        margin: 20px 10px;
        padding: 20px 15px;
    }

    section h2 {
        font-size: 1.8em;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-img {
        max-width: 180px;
    }

    .quick-links {
        flex-direction: column;
    }

    .link-button {
        width: 100%;
        padding: 12px 20px;
        font-size: 1em;
    }

    /* Project items mobile optimization */
    .project-item {
        padding: 15px;
        margin-bottom: 15px;
    }

    .project-item h3 {
        font-size: 1.1em;
        line-height: 1.4;
        padding-right: 30px;
    }

    .toggle-icon {
        font-size: 1em;
        position: absolute;
        right: 15px;
        top: 15px;
    }

    .project-item:hover {
        transform: translateX(0);
    }

    .project-description p {
        font-size: 0.95em;
    }

    /* Ensure touch events work properly */
    .project-item {
        -webkit-tap-highlight-color: rgba(102, 126, 234, 0.1);
        touch-action: manipulation;
    }

    /* Skills list mobile */
    .skills-list h3 {
        font-size: 1.1em;
    }

    ul li {
        font-size: 0.95em;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    header#top1 h1 {
        font-size: 1.5em;
    }

    header#top1 p {
        font-size: 0.9em;
    }

    .navbar {
        padding: 0.8rem 1rem;
    }

    .nav-brand {
        font-size: 1.5em;
    }

    section {
        margin: 15px 5px;
        padding: 15px 10px;
    }

    section h2 {
        font-size: 1.5em;
    }

    .project-item h3 {
        font-size: 1em;
        padding-right: 25px;
    }

    .toggle-icon {
        right: 10px;
        top: 12px;
    }
}