:root {
    /* Colors */
    --primary-color: #1a73e8;
    --secondary-color: #ff9800;
    --accent-color: #34c759;
    --background-color: #f9f9f9;
    --dark-bg-color: #222;
    --text-color: #333;
    --light-text-color: #555;

    /* Fonts */
    --heading-font: 'Poppins', sans-serif;
    --body-font: 'Open Sans', sans-serif;

    /* Sizing & Spacing */
    --max-width: 1200px;
    --section-padding: 4rem;
    --border-radius: 8px;

    /* Effects */
    --transition-speed: 0.3s;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-dark: linear-gradient(135deg, #111, #333);
}

body {
    font-family: var(--body-font);
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

header {
    background: var(--primary-color);
    color: white;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

header h2 {
    font-family: var(--heading-font);
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0 1rem;
    
}

.nav-links.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
}

nav a {
    position: relative;
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color var(--transition-speed);
}

nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width var(--transition-speed) ease-in-out;
}

nav a:hover,
nav a:focus {
    color: var(--secondary-color);
}

nav a:hover::after,
nav a:focus::after {
    width: 100%;
}

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

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    transition: all var(--transition-speed);
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

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

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* All Section Style */
section {
    max-width: var(--max-width);
    margin: auto;
    padding: var(--section-padding) 2rem;
}

/* All Nav links (a) */
a {
    position: relative;
    color: inherit;
    text-decoration: none;
}

a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0%;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

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

/* Hero Section */
.hero {
    max-width: 100%;
    background: var(--gradient-primary);
    background-size: 400% 400%;
    animation: gradientShift 30s ease infinite;
    color: white;
    padding: 6rem 0;
    box-shadow: var(--shadow-md);
}

.hero-content {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 0 2rem;
    max-width: 1200px;
    margin: auto;
}

.hero-text {
    flex: 1;
    text-align: center;
}

.hero-image {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-name {
    font-family: var(--heading-font);
}

.hero-image img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.hero h1 {
    font-family: var(--heading-font);
    font-size: 2.5rem;
}

.hero p {
    max-width: 700px;
    margin: 1rem auto;
    font-size: 1.1rem;
}

.btn {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    margin: 0.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all var(--transition-speed);
}

.btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.social-links {
    margin-top: 1rem;
}

.social-links a img {
    width: 24px;
    padding: 10px;
    margin: 10 10px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.social-links a:hover img {
    transform: scale(1.2);
}

/* Gradient animation keyframes */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%;}
}

/* ABOUT SECTION */
.about {
    padding: 4rem 2rem;
    background-color: var(--background-color);
    color: var(--dark-bg-color);
    max-width: 100%;
}

.about-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 1000px;
    margin: auto;
}

.about-img{
    width: 260px;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(45deg, var(--dark-bg-color), var(--light-text-color), var(--dark-bg-color));
    background-size: 300% 300%;
    animation: borderGradient 6s ease infinite;
    box-sizing: border-box;
}

.about-img img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    border: 0px solid white;
}

.about-text {
    max-width: 600px;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-family: var(--heading-font);
}

.about-text p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.about-text ul {
    list-style: none;
    padding: 0;
    font-size: 0.95rem;
}

.about-text ul li {
    margin-bottom: 0.5rem;
}

.about-text ul a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid transparent;
    transition: border-color var(--transition-speed);
}

/* Gradient animation keyframes */
@keyframes borderGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* SKILLS SECTION */
.skills {
    background-color: #ffffff;
    padding: 4rem 2rem;
    text-align: center;
    max-width: 100%;
}

.skills h2 {
    font-family: var(--heading-font);
    font-size: 2rem;
    color: var(--dark-bg-color);
    margin-bottom: 0.5rem;
}

.skills-intro {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: var(--light-text-color);
}

.skill {
    margin-bottom: 25px;
    text-align: left;
}

.skill-name {
    font-weight: bold;
    margin-bottom: 8px;
    display: inline-block;
}

.skill-bar {
    background: rgba(97, 96, 96, 0.274);
    border-radius: 20px;
    overflow: hidden;
    height: 20px;
}

.skill-fill {
    height: 100%;
    width: 0;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-radius: 20px;
    padding-right: 10px;
    transition: width 1.2s ease-in-out;
}

.skill-percent {
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* PROJECTS SECTION */
.projects {
    background-color: #f4f6f8;
    padding: 4rem 2rem;
    text-align: center;
    max-width: 100%;
}

.projects h2 {
    font-family: var(--heading-font);
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.projects-intro {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: var(--light-text-color);
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: auto;
}

.project-card {
    background: var(--background-color);
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    padding: 1.5rem;
    text-align: left;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.project-card h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.project-card p {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.project-links a {
    display: inline-block;
    margin-right: 10px;
    padding: 0.4rem 1rem;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.project-links a:hover {
    background-color: var(--secondary-color);
}

/* CONTACT SECTION */
.contact {
    padding: 4rem 2rem;
    background: #fff;
    max-width: 100%;
}

.contact-container {
    max-width: 1200px;
    margin: auto;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-family: var(--heading-font);
    color: var(--text-color);
}

.contact-description {
    font-size: 1rem;
    color: var(--light-text-color);
    text-align: center;
    max-width: 1000px;
    margin: 0 auto 3rem auto;
}

/* Contact Layout */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Contact info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 1rem;
    color: var(--text-color);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.contact-item:hover i {
    transform: scale(1.2);
}

.contact-item a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary-color);
}

/* Contact Form Styling */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: var(--body-font);
    transition: border 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: var(--shadow-md);
}

.contact-form textarea {
    resize: none;
    height: 120px;
}

.contact-form button {
    display: inline-block;
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: #fff;
    font-size: 1rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s ease, backround 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.contact-form button:hover {
    transform: translateY(-2px);
    background: var(--secondary-color);
    box-shadow: var(--shadow-md);
}

.contact-form i {
    font-size: 1rem;
}

/* Toast success message */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--secondary-color);
    color: white;
    padding: 0.75rem 1.2rem;
    border-radius: 5px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    z-index: 999;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Back to Top Button */
#topBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    transition: all var(--transition-speed);
}

#topBtn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

/* Animation on Scroll */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

/* Footer section */
footer {
    text-align: center;
    padding: 2rem;
    background: var(--primary-color);
    color: white;
}

.footer p {
    margin-bottom: 0.5rem;
}


/* For Min-width */
@media (min-width: 768px) {
    body {
        overflow: hidden;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .hero-text {
        flex: 1;
    }

    .hero-image {
        flex: 1;
        display: flex;
        justify-content: center;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .hero-text h2 {
        font-size: 1.8rem;
    }

    .hero-text p {
        text-align: left;
    }

    /* ABOUT SECTION */
    .about-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .about-img img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    border: 0px solid white;
    }

    .about-text {
        padding-left: 2rem;
        flex: 1;
    }

    /* For Skill Section */
    .skills-tags {
        gap: 0.5rem;
    }

    .skills-tags span {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    /* PROJECTS SECTION */
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Contacts section */
    .contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
}

/* For Responsive Display for smaller screens*/
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        background: var(--primary-color);
        position: absolute;
        top: 70px;
        right: 0;
        width: 200px;
        padding: 1rem;
        box-shadow: var(--shadow-md);
    }

    .nav-links.active {
        display: flex;
    }

     .hamburger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        gap: 5px;
        z-index: 1100; /* Above nav links*/
    }

    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        background: white;
        border-radius: 2px;
        transition: all var(--transition-speed);
    }

    /* Animated hamburger open state */
    .hamburger.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

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

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

    .contact h2 {
        font-size: 2rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}
