@import url(https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap);
@import url(https://fonts.googleapis.com/css2?family=Delicious+Handrawn&display=swap);
@import url(https://fonts.googleapis.com/css?family=Roboto:300,400,600);

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

:root {
    --body-color: rgba(250, 250, 250);
    --color-white: rgba(250, 250, 250);
    --text-color: rgba(38, 37, 37);
    --first-color: rgb(24, 132, 55);
    --first-shadow: rgba(0, 0, 0, 0.1);
    --box-color: #fff;
    --nav-color: #fff;
    --nav-icon: #000;
    --logo-color: #000;
    --icon-color: #242526;
    --mode-color: #ccc;
}

body {
    background: var(--body-color);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Dark mode */
body.dark {
    --body-color: #111212;
    --box-color: #242525;
    --nav-color: #111212;
    --color-white: #fff;
    --text-color: #fff;
    --nav-icon: #fff;
    --logo-color: #fff;
    --icon-color: #ffffff;
    --mode-color: #ffffff;
}

body.dark,
body.dark p,
body.dark a,
body.dark span,
body.dark li {
    color: var(--text-color);
}

.container {
    width: 100%;
    position: relative;
}

html {
    scroll-behavior: smooth;
}

/* Navbar */
nav {
    position: fixed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 80px;
    background: var(--nav-color);
    padding: 0 5%;
    z-index: 999;
    transition: top 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(197, 209, 200, 0.5);
    border-radius: 8px;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    padding: 0.5rem 1rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--first-color);
}

/* Active Link Styling */
.active-link {
    color: var(--first-color);
}

.nav-menu-btn {
    display: none;
}

.nav-menu-btn i {
    font-size: 24px;
    cursor: pointer;
    color: var(--nav-icon);
}

/* Mode Toggle */
.mode {
    display: flex;
    align-items: center;
}

.moon-sun {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
    border-radius: 50%;
    cursor: pointer;
    background: var(--mode-color);
    transition: all 0.3s ease;
}

.moon-sun:hover {
    transform: scale(1.1);
}

.moon-sun :is(#moon, #sun) {
    position: absolute;
    font-size: 18px;
    color: black;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

#sun {
    opacity: 0;
    transform: scale(0.8);
}

#moon {
    opacity: 1;
    transform: scale(1);
}

body.dark #moon {
    opacity: 0;
    transform: scale(0.8);
}

body.dark #sun {
    opacity: 1;
    transform: scale(1);
}

/* Hamburger Menu Styles */
      .nav-menu-btn {
        display: none;
        flex-direction: column;
        cursor: pointer;
        gap: 4px;
        z-index: 1001;
      }

      .nav-menu-btn span {
        width: 25px;
        height: 3px;
        background: #333;
        transition: all 0.3s ease;
        transform-origin: center;
      }

      .nav-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
      }

      .nav-menu-btn.active span:nth-child(2) {
        opacity: 0;
      }

      .nav-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
      }

      /* Mobile Styles */
      @media (max-width: 768px) {
        .nav-menu-btn {
          display: flex;
        }
    }

/* Main Content Wrapper */
.wrapper {
    padding-inline: 10vw;
}

/* Features/Hero Section */
.features-box {
    position: relative;
    display: flex;
    height: 100vh;
    min-height: 700px;
}

.features-text {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    flex-direction: column;
    width: 50%;
    padding-left: 20px;
    margin-top: 1%;
}

.features-text .hello {
    font-size: 50px;
    font-weight: 500;
    margin-bottom: -10px;
    color: var(--text-color);
}

.features-name {
    font-size: 50px;
    font-weight: 600;
    margin-block: 20px;
    color: #0d9d3d;
    margin-bottom: 10px;
}

.typedText {
    font-family: sans-serif;
    color: #1a8d22;
    font-size: 24px;
    font-weight: 600;
    text-transform: capitalize;
    line-height: 1.5;   /* gives breathing room */
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid #149e3d;
    animation: blink 0.7s step-end infinite;
}


@keyframes blink {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: #146233;
    }
}

.text-info {
    font-size: 16px;
    margin-bottom: 30px;
    color: var(--text-color);
}

.text-btn {
    display: flex;
    border-radius: 8px;
    cursor: pointer;
    gap: 20px;
}

.btn {
    text-decoration: none;
    font-size: 15px;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 8px;
    background-color: #43a946;
    font-weight: 500;
    transition: all 0.5s ease;
}

.btn i {
    margin-right: 10px;
}

i {
    font-size: 16px;
}

/* Social Icons */
.social-icons {
    display: flex;
    margin-top: 100px;
    margin-left: 5px;
    gap: 32px;
}

.social-icons .icon_circle {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    color: var(--icon-color);
    border-radius: 50%;
    box-shadow: 0px 1px 5px 3px #22b24a;
    cursor: pointer;
    position: relative;
    animation: spin 2s linear infinite;
}

.icon_circle {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    animation: iconSlide 4s infinite alternate, spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes iconSlide {
    25% {
        border: 2px solid #7be62e;
        left: 0px;
    }
    50% {
        border: 2px solid #027731;
        left: 70px;
    }
    75% {
        border: 2px solid #0b644b;
        left: 145px;
    }
    100% {
        border: 2px solid #1e4513;
        left: 216px;
    }
}

.social_icons:hover .icon_circle {
    animation-play-state: paused;
    cursor: pointer;
}

/* Features Image */
.features-image {
    display: flex;
    justify-content: left;
    align-items: center;
    min-height: 80vh;
    width: 100%;
    margin-top: 30px;
    margin-left: 10px;
    max-width: 40%;
}

.image {
    margin-top: 10%;
    padding-left: 0;
    width: 100%;
    max-width: 600px;
    height: auto;
    overflow: hidden;
    animation: imgFloat 5s ease-in-out infinite;
}

.image img {
    width: 50%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.profile {
    margin-top: 20px;
    padding: 50%;
    width: 200%;
    height: auto;
    justify-content: flex-start;
}

/* Projects Section */
.section {
    padding: 100px 5% 60px;
    min-height: 100vh;
    text-align: center;
}

.projects-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--first-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.category-section {
    margin-bottom: 4rem;
}

.category-title {
    font-size: 2rem;
    color: var(--first-color);
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--first-color);
}

.project-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: var(--box-color);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

body.dark .project-card {
    background: var(--box-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}
body.dark.card-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.card-content p {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.view-link {
    text-decoration: none;
    color: var(--first-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: color 0.3s ease;
}

.view-link:hover {
    color: #1a7a32;
    text-decoration: underline;
}

.tech-tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tech-tag {
    background: linear-gradient(135deg, var(--first-color), #1a7a32);
    color: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    border: none;
    cursor: default;
    transition: transform 0.2s ease;
}

.tech-tag:hover {
    transform: scale(1.05);
}

/* Contact Section */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 50px;
    
    

}

.contact-framed {
    border: 2px solid var(--first-color);
    border-radius: 10px;
    padding-top: 20px;
    padding-bottom: 20px;
    background: var(--box-color);
    background: linear-gradient(35deg, #ffffff, #ffffff);
    max-width: 1200px;
}

body.dark .contact-framed {
    background: linear-gradient(35deg, #000000, #000000);
}

.contact-info {
    flex: 1;
    max-width: 400px;
    text-align: left;
    color: var(--text-color);
}

.contact-info h2 {
    font-size: 24px;
    font-weight: bold;
    color: var(--first-color);
    margin-bottom: 40px;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px;
}

.info-item i {
    font-size: 20px;
    color: var(--first-color);
    margin-right: 10px;
}

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

.info-item a:hover {
    color: var(--first-color);
}

.contact-form {
    flex: 1;
    max-width: 500px;
    background: var(--body-color);
    padding: 20px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(65, 64, 64, 0.5);

}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background: var(--box-color);
    color: var(--text-color);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--first-color);
    box-shadow: 0 0 5px rgba(35, 213, 43, 0.5);
    outline: none;
}

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

.form-button {
    text-align: right;
}

.form-button .btn {
    text-decoration: none;
    font-size: 15px;
    padding: 10px 20px;
    border-radius: 5px;
    background-color: var(--first-color);
    color: var(--color-white);
    font-weight: 500;
    transition: background 0.3s;
}

.form-button .btn:hover {
    background: rgba(26, 154, 73, 0.8);
}

/* Feedback Message */
#form-feedback {
    margin-top: 1rem;
    padding: 10px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    display: none;
}

#form-feedback.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

#form-feedback.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Footer - Updated to match third CSS */
footer {
    background: var(--nav-color);
    color: var(--text-color);
    padding: 3rem 5% 1rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.top-footer {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark .top-footer {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo-image {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(197, 209, 200, 0.3);
    border-radius: 8px;
}

.footer-description {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.6;
    margin-top: 1rem;
}

.footer-links h3,
.footer-social h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--first-color);
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu-list {
    margin-bottom: 0.5rem;
}

.footer-menu-list a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-menu-list a:hover {
    color: var(--first-color);
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--box-color);
    border-radius: 50%;
    color: var(--icon-color);
    transition: all 0.3s ease;
    font-size: 1.2rem;
    text-decoration: none;
    position: relative;
}

.social-icon:hover {
    background: var(--first-color);
    color: white;
    transform: translateY(-3px);
}

.bottom-footer {
    text-align: center;
    padding-top: 2rem;
}

.bottom-footer p {
    font-size: 0.85rem;
    color: var(--text-color);
}

.bottom-footer a {
    text-decoration: none;
    color: var(--first-color);
    font-weight: 600;
}

.bottom-footer a:hover {
    text-decoration: underline;
}

/* Popup Message */
#popup-message {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #4ade80;
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 1000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav_menu_list {
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--nav-color);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        display: none;
    }
    
    .nav-menu-btn {
        display: block;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    .project-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .top-footer {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .section {
        padding: 80px 3% 40px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 2rem;
    }
    
    .card-content {
        padding: 1.5rem;
    }
    
    .tech-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
}
/* Hero Section Responsive Fix */
@media (max-width: 768px) {
    .features-box {
        flex-direction: column;
        align-items: center;
        min-height: auto;
        padding: 20px 0;
    }

    .features-text {
        width: 90%;
        padding-left: 0;
        text-align: center;
        margin-top: 20px;
    }

    .features-text .hello,
    .features-name {
        font-size: 32px;
    }

    .typedText {
        font-size: 18px;
        height: 25px;
    }

    .features-image {
        width: 90%;
        max-width: 400px;
        margin: 20px 0;
        justify-content: center;
    }

    .features-image img {
        width: 100%;
        height: auto;
        object-fit: contain; /* keep full image visible */
        border-radius: 10px;
    }

    .social-icons {
        margin-top: 30px;
        gap: 20px;
        justify-content: center;
    }
}

/* Smaller Phones (<480px) */
@media (max-width: 480px) {
    .features-text .hello,
    .features-name {
        font-size: 24px;
    }

    .typedText {
        font-size: 16px;
    }

    .btn {
        font-size: 14px;
        padding: 8px 16px;
    }

    .features-image {
        width: 95%;
        max-width: 300px;
        margin: 15px 0;
    }

    .features-image img {
        width: 100%;
        height: auto;
        object-fit: contain; /* fully visible */
    }

    .project-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

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

    .card-content h3 {
        font-size: 1rem;
    }

    .tech-tag {
        font-size: 0.65rem;
        padding: 0.15rem 0.5rem;
    }

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

    .contact-form,
    .contact-info {
        max-width: 100%;
    }

    .wrapper {
        padding-inline: 5%;
    }
}
/* QR Modal (no horizontal scroll at all) */
.qr-modal {
  display: none;
  position: fixed;
  top: 0; 
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);

  /* Center content safely */
  display: flex;
  justify-content: center;
  align-items: center;

  /* Kill scrollbars */
  overflow-x: hidden;
  overflow-y: auto;
}

/* Modal Card */
.qr-modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  width: min(90%, 350px); /* responsive: max 350px */
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  position: relative;
}

/* Title */
.qr-modal-content h2 {
  margin-bottom: 10px;
  font-size: 1.3rem;
  color: #222;
}

/* QR Image */
.qr-image {
  width: 180px;
  height: 180px;
  margin: 10px auto;
  display: block;
}

/* Close Button */
.qr-close {
  position: absolute;
  top: 10px; 
  right: 15px;
  font-size: 26px;
  font-weight: bold;
  color: #444;
  cursor: pointer;
}

.qr-close:hover {
  color: #e63946;
}

/* Subtext */
.qr-modal-content p {
  font-size: 0.9rem;
  color: #555;
}
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden; /* 🔑 no horizontal scroll ever */
}
/* Hide modal initially */
.qr-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; 
  top: 0;
  width: 100%; 
  height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
}
