@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;
}

/* 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-menu {
    /* Add transition for smooth animation */
    transition: max-height 0.3s ease;
}

@media (max-width: 768px) {
    .nav-menu {
        /* Change from display: none to max-height for smooth animation */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
    }
    
    .nav-menu.active {
        max-height: 300px;
        padding: 1rem 0;
    }
}

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

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    height: 2px;
    width: 100%;
    background-color: var(--first-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}



.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);
}

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

.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(--first-color);
    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);
}

/* Footer */
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;
    }
}
/* 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;
}
