* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #0f2027 50%, var(--primary-green) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-accent);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--text-accent);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-accent);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Custom Hamburger Icon Animation */
.navbar-toggler {
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    position: relative;
    background-color: transparent;
    transition: transform 0.3s ease;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.hamburger-icon {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-accent);
    transition: all 0.3s ease-in-out;
    position: absolute;
    left: 0;
}

/* Default state: Hamburger Icon */
.hamburger-icon span:first-child {
    top: 0;
}

.hamburger-icon span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-icon span:last-child {
    bottom: 0;
}

/* Animate to cross when toggled */
.hamburger-toggled span:first-child {
    transform: rotate(45deg);
    top: 50%;
}

.hamburger-toggled span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-toggled span:last-child {
    transform: rotate(-45deg);
    top: 50%;
}

/* All screens */
.navbar-collapse {
    /* Apply a smooth transition on max-height */
    transition: max-height 0.5s ease-in-out;
}

/* For screens smaller than 992px (mobile view) */
@media (max-width: 991.98px) {
    .navbar-collapse {
        /* Initially hide the content */
        overflow: hidden;
        max-height: 0;
    }
}

/* For screens 992px and larger (desktop view) */
@media (min-width: 992px) {
    .navbar-collapse {
        /* Reset the animation properties for desktop */
        max-height: none !important;
        overflow: visible;
        display: flex !important;
        flex-basis: auto;
    }
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background:
        radial-gradient(circle at 20% 30%, rgba(45, 90, 39, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(107, 142, 107, 0.08) 0%, transparent 50%);
}

.hero-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.8rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-accent);
    font-weight: 600;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.cta-primary {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: white;
    padding: 14px 28px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(45, 90, 39, 0.3);
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(45, 90, 39, 0.4);
}

.cta-secondary {
    border: 2px solid var(--text-accent);
    color: var(--text-accent);
    padding: 12px 26px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.cta-secondary:hover {
    background: var(--text-accent);
    color: var(--dark-bg);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease-out 0.8s both;
}

.hero-stats {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.stat-item {
    text-align: center;
    margin-bottom: 1.5rem;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-accent);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Sections */
.section {
    padding: 6rem 0;
    position: relative;
}

.section-title {
    font-size: 3rem;
    /* Increased font size for a bolder look */
    font-weight: 700;
    /* Ensured bold font weight */
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 1.25rem;
    /* Increased font size for better readability */
    color: var(--text-secondary);
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    /* Centered the subtitle */
    margin-right: auto;
    /* Centered the subtitle */
    line-height: 1.6;
    /* Improved line spacing for readability */
}

.text-center {
    text-align: center;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    align-items: start;
}

.about-image {
    width: 280px;
    height: 350px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.about-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.about-text h3 {
    color: var(--text-accent);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.about-text h3:first-of-type {
    margin-top: 0;
}

.about-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.highlight-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.highlight-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-green), var(--text-accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.highlight-item h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.highlight-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.about-image {
    width: 280px;
    height: 350px;
    position: relative;
    cursor: pointer;
    perspective: 1000px;
}

.image-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.about-image.flipped .image-card {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-front {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
}

.card-back {
    transform: rotateY(180deg);
    background: var(--card-bg);
    backdrop-filter: blur(10px);
}

.card-front img,
.card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

/* Hover effect */
.about-image:hover .image-card {
    box-shadow: 0 12px 40px rgba(143, 188, 143, 0.2);
}

/* Click indicator */
.about-image::after {
    content: "Click to flip";
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--text-accent);
    opacity: 0.7;
    pointer-events: none;
}

.about-image.flipped::after {
    content: "Click to flip back";
}

/* Click Me text */
.click-me-text {
    text-align: center;
    margin-top: 15px;
    font-size: 1rem;
    color: var(--text-accent);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.click-me-text:hover {
    color: var(--primary-green);
    transform: scale(1.05);
}

/* Original click indicator (keeping it smaller) */
.about-image::after {
    content: "Click to flip";
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.6;
    pointer-events: none;
}

.about-image.flipped::after {
    content: "Click to flip back";
}

/* Skills Section */
.skill-category {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--text-accent);
}

.skill-category h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    padding: 0.8rem 0;
}

.skill-item:last-child {
    margin-bottom: 0;
}

.skill-name {
    font-weight: 500;
    color: var(--text-primary);
}

.skill-level {
    font-size: 0.9rem;
    color: var(--text-accent);
    font-weight: 600;
}

/* Corrected Bootstrap progress bar styles */
.progress {
    width: 100px;
    /* Set a fixed width for the bar container */
    height: 6px;
    /* Explicitly set height */
    background: rgba(143, 188, 143, 0.2);
    border-radius: 3px;
    margin-left: 1rem;
    /* Adjust spacing */
}

.progress-bar {
    background-image: linear-gradient(90deg, var(--primary-green), var(--text-accent));
    transition: width 1s ease-in-out;
    width: 0;
    height: 100%;
    /* Make the bar fill the container height */
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(143, 188, 143, 0.05), transparent);
    transition: left 0.5s ease;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--text-accent);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-green), var(--text-accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.project-card h3 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0;
}

.project-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: rgba(45, 90, 39, 0.3);
    color: var(--text-accent);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(143, 188, 143, 0.3);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--text-accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: var(--text-primary);
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1.2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.contact-item:hover {
    border-color: var(--text-accent);
    transform: translateX(5px);
}

.contact-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-green), var(--text-accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    font-size: 1.2rem;
}

.contact-details strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.contact-details span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contact-cta {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
}

.contact-cta h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-cta p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-cta .cta-primary {
    display: inline-block;
}

.email-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.email-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-bg, white);
    border: 1px solid var(--border-color, #ddd);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.popup-header {
    background: linear-gradient(135deg, var(--primary-green, #2d5a27), var(--secondary-green, #4a7c59));
    color: white;
    padding: 20px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.popup-body {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary, #333);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color, #ddd);
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    background: var(--card-bg, white);
    color: var(--text-primary, #333);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green, #2d5a27);
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.send-btn {
    background: linear-gradient(135deg, var(--primary-green, #2d5a27), var(--secondary-green, #4a7c59));
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(45, 90, 39, 0.3);
}

.send-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(45, 90, 39, 0.4);
}

.send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.popup-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    font-size: 14px;
}

.popup-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.popup-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .email-popup {
        width: 95%;
        margin: 10px;
    }

    .popup-header,
    .popup-body {
        padding: 20px;
    }
}

/* Footer */
footer {
    background: var(--dark-bg);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0;
    text-align: center;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes growBar {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}
