 * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    
}

/* Responsive: from 320px up to 500px */
@media (min-width: 300px) and (max-width: 500px) {
    .center ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1px !important;
    }

    .center a {
        font-size: 12px !important;
        padding: 0 4px !important;
    }

    #themeToggle .icon {
        width: 18px !important;
        height: 18px !important;
    }

    .logo {
        width: 50px !important;
        height: 50px !important;
        border-radius: 5px !important;
        object-fit: cover !important;
        /* keeps proportions */
    }

    .text {
        display: flex;
        justify-content: center;
        margin: 5%;
    }

    .contact_forms {
        display: flex !important;
        flex-direction: column !important;
    }

    .contact_forms {
        padding-left: 20px;
    }

    .form-data {
        margin-top: 30px !important;
    }

    .picture_about {
        flex-direction: column !important;
        gap: 20px;
        padding-top: 5%;
    }

    .service-card-info {
        display: grid;
        justify-content: center;
        align-items: center;
        flex-direction: column;
         grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 40px;
    }
     .service-card-info {
    grid-template-columns: repeat(2, 1fr); /* exactly 2 per row */
    gap: 15px;
  }
   .tools-card-info {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* exactly 2 columns */
        gap: 15px !important; /* space between cards */
        justify-items: center !important; /* center items in each column */
        margin-top: 5% !important;
    }

    .footer_about h1 {
        font-size: 16px !important;
    }

    .footer_item {
        display: flex;
        flex-direction: column;
    }

    .footer_about p {
        font-size: 14px !important;
    }

    .footer_links p {
        font-size: 16px !important;
    }

    .footer_socials a svg {
        width: 18px !important;
        height: 18px !important;
        transition: transform 0.3s;
    }

    .footer_links ul li {
        font-size: 14px !important;
    }

    .circle-bullets li h4 {
        margin-bottom: 8px;
        /* space between h4 and first <p> */
    }

    .circle-bullets li p {
        margin-top: 6px;
        /* extra space if needed */
    }
    

}

/* Reset & Base */
body {
    background-color: #fff;
    font-family: Arial, sans-serif;
}

/*Data flicker*/
body[data-loading] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* show pages after js is loaded */
body[data-loading="loaded"] {
    opacity: 1;
}

nav {
    background-color: aliceblue;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.logo {
    height: 4%;
    width: 4%;
    border-radius: 2px;
    padding: 10px;
    border-radius: 5px;
}

.center ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.center li {
    margin: 0;
}

a {
    position: relative;
    text-decoration: none;
    color: #5b6370;
    font-weight: 500;
    transition: color 0.3s ease;
}

a:hover {
    color: #007BFF;
}

/* Tooltip */
a::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background-color: #333;
    color: #fff;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 2px 6px #0000004d;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
}

a:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Dark/Light toggle button */
#themeToggle {
    background: none;
    cursor: pointer;
    margin-right: 15px;
    border: none;
}

#themeToggle:focus,
#themeToggle:active {
    outline: none;
    background: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
    /* removes tap highlight on mobile */
}


.icon {
    width: 24px;
    height: 24px;

    transition: transform 0.3s, stroke 0.3s;
}

.hidden {
    display: none;
}

/* Dark Mode */
body.dark-mode {
    background-color: #1a1b26;
    color: #fff;
}

body.dark-mode nav {
    background-color: #838892;
}

body.dark-mode a {
    color: #fff;
}

body.dark-mode a:hover {
    color: #ffd600;
}


body.dark-mode .icon {
    stroke: #fff;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
}

main {
    flex: 1;
    /* pushes footer down */
}

/* Footer Base */
footer {
   padding: 30px 20px;
    font-family: Arial, sans-serif;
    background: #f3f4f6;
    /* Add these: */
    margin-top: auto; /* push footer to bottom */
}

/* Dark Mode Footer */
body.dark-mode footer {
    background-color: #232536 !important;
    color: #f3f4f6;
}


/* Text sections */
footer.dark-mode .footer_about h1,
footer.dark-mode .footer_about p,
footer.dark-mode .footer_links p,
footer.dark-mode .footer_copy {
    color: #f1f5f9;
}

/* Links */
footer.dark-mode .footer_links a {
    color: #cbd5e1;
    /* muted gray */
}

footer.dark-mode .footer_links a:hover {
    color: #60a5fa;
    /* blue hover */
}

/* Social Icons – now inherit color */
footer.dark-mode .footer_socials a {
    color: #f1f5f9;
}

footer.dark-mode .footer_socials a:hover {
    color: #60a5fa;
}

/* Divider line */
footer.dark-mode .footer_line {
    border-top: 1px solid #334155;
}

section {
    padding-bottom: 10%;
}

/* Flex Layout */
.footer_item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin-top: 10px;
    gap: 30px;
    align-items: flex-start;
}

/* About Section */
.footer_about h1 {
    margin: 0;
    font-size: 22px;
}

.footer_about p {
    margin: 5px 0 0 0;
    font-size: 16px;
}

/* Links */
.footer_links p {
    margin-bottom: 8px;
    font-weight: bold;
}

.footer_links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer_links ul li {
    margin-bottom: 6px;
}

.footer_links a {
    text-decoration: none;
    color: #333;
}

.footer_links a:hover {
    color: #007BFF;
}

/* Socials */
.footer_socials {
    display: flex;
    gap: 15px;
}

.footer_socials a svg {
    width: 28px;
    height: 28px;
    transition: transform 0.3s;
}

.footer_socials a:hover svg {
    transform: scale(1.2);
}

/* Footer Line */
.footer_line {
    border: none;
    border-top: 1px solid #999;
    margin: 20px 0;
}

/* Copyright */
.footer_copy {
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* contact main */
.contact_main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 10vh;
}

.contact_icons {
    width: 30px;
    height: 30px;
    background: #eceff3;
    border-radius: 12px;
    display: flex;
    /* use flexbox to center SVG */
    align-items: center;
    /* vertical centering */
    justify-content: center;
    /* horizontal centering */
}

.contact_icons_svg {
    width: 16px;
    /* size the SVG smaller than container */
    height: 16px;
}

.contact_forms {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10%;
    padding-top: 20px;
}

.contact_me {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding-top: 10px;
}

.contact_details {
    display: flex;
    /* horizontal layout */
    flex-direction: column;
    /* vertical alignment */
}

.follow_me {
    padding-top: 20px;
}

.input_type {
    border-radius: 10px;
    border: #d5d9de 1px solid;
    padding: 8px 8px;
    margin-bottom: 10px;
    width: 250px;
}

textarea {
    resize: vertical;
    min-height: 80px;
    max-height: 300px;
}

.button_class {
    display: flex;
    flex-direction: column;
    background-color: #6b8cae;
    border: none;
    text-align: center;
    color: #eceff3;
    padding: 10px;
    width: 270px;
    border-radius: 7px;
}

.label_text {
    color: #374151;
    font-size: small;
    padding-bottom: 5px;
    display: flex;
    flex-direction: column;
}

.contact_title {
    color: #111827;
}

/*About me page*/

.about_main {
    padding-top: 10vh;
    padding-left: 5px;
    padding-right: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.about_journey {
    padding: 5%;

}

.circle-bullets li h4 {
    margin-bottom: 8px;
    /* space between h4 and first <p> */
}

.circle-bullets li p {
    margin-top: 6px;
    /* extra space if needed */
}

.picture_about {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding-top: 5%;

}

ul.circle-bullets {
    list-style: none;
    /* remove default bullets */
    padding-left: 30px;
    /* space for bullets */
    margin: 20px;
}

ul.circle-bullets li {
    position: relative;
    margin-bottom: 10px;
    font-size: 16px;
    /* adjust as needed */
}

ul.circle-bullets li::before {
    content: "";
    top: 2px;
    position: absolute;
    left: -30px;
    /* space from text */
    width: 12px;
    /* bullet size */
    height: 12px;
    border-radius: 50%;
    /* make circle */
    background-color: #6b8cae;
    /* your color */
}

body.dark-mode #about {
    background-color: #1e1e2f;
}

/*For contact darkmode*/
/* Contact Section Dark Mode */
body.dark-mode #contact {
    background-color: #1e1e2f;
}

body.dark-mode .main-body h1,
body.dark-mode .main-body h2,
body.dark-mode .main-body h3,
body.dark-mode .main-body h4,
body.dark-mode .main-body h5,
body.dark-mode .main-body h6,
body.dark-mode .main-body p,
body.dark-mode .main-body a,
body.dark-mode label,
body.dark-mode ::placeholder {
    color: #e5e7eb !important;
    /* light gray */
}

body.dark-mode .contact_icons {
    background: #2a2b3d;
    /* darker bg for icons */
}

body.dark-mode .contact_icons_svg {
    stroke: #e5e7eb;
    /* light gray stroke */
    fill: #e5e7eb;
}

body.dark-mode .input_type,
body.dark-mode textarea {
    background-color: #2a2b3d;
    color: #f9fafb;
    border: 1px solid #444;
}

body.dark-mode .input_type::placeholder,
body.dark-mode textarea::placeholder {
    color: #9ca3af;
    /* muted placeholder */
}

body.dark-mode .button_class {
    background-color: #3b82f6;
    /* blue button */
    color: #fff;
}

/*Home page*/
/* Home Page Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 70vh;
    /* Adjust height as needed */
    overflow: hidden;
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    max-width: 800px;
    color: #111827;
}

.hero-overlay h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-overlay p {
    font-size: 1.1rem;
    color: #3c424b;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.hero-buttons .btn-primary,
.hero-buttons .btn-secondary {
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
}

/* Button hover effects */
.btn-primary {
    background: #6b8cae;
    color: white;
    border: none;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #80a7ce;
}

.btn-secondary {
    background: transparent;
    color: #374151;
    border: 1px solid #d2d6dd;
    transition: background 0.3s, color 0.3s;
}

.btn-secondary:hover {
    background: white;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero {
        height: 80vh;
    }

    .hero-overlay h1 {
        font-size: 1.8rem;
    }

    .hero-overlay p {
        font-size: 1rem;
    }

    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        font-size: 0.9rem;
        padding: 8px 16px;
    }
      .project-card img {
        height: 180px;
      }

      .project-content {
        padding: 16px;
      }

}

@media (max-width: 480px) {
    .hero-overlay h1 {
        font-size: 1.5rem;
    }

    .hero-overlay p {
        font-size: 0.9rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
        margin: 10px auto;
    }
    .projects-container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
     .project-content h3 {
        font-size: 1.1rem;
      }

      .project-content p {
        font-size: 0.9rem;
      }

}

.service {
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    text-align: center
}

.service-card-info {
    display: flex;
    justify-content: space-evenly;
    margin-top: 5%;
}

.service_card {
    display: grid;
    place-items: center;
    box-shadow: 0 4px 12px #12121226;
    margin-top: 15px;
    padding: 20px;
    background: #fffafa;
    width: 200px;
    border-radius: 15px;
}

/*For dark mode service card*/
body.dark-mode .service_card {
    background: #1f2937;
    color: #f3f4f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

/*For technologies*/
.tools-card-info {
    display: flex;
    justify-content: space-evenly;
    margin-top: 5%;
}
.tools_card {
    display: grid;
    place-items: center;
    box-shadow: 0 4px 12px #12121226;
    margin-top: 15px;
    padding: 20px;
    background: #fffafa;
    width: 120px;
    height: 100px;
    border-radius: 15px;
}

.tools_card h5 {
    padding-top: 15px;
    color: #374151;
}

/*For dark mode service card*/
body.dark-mode .tools_card {
    background: #1f2937;
    color: #f3f4f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

body.dark-mode .tools_card h5 {
    padding-top: 15px;
    color: white;
}

 body.dark-mode .project-card {
    background: #1f2937;
    color: #f3f4f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

body.dark-mode .project-content {
    color: white;
}

    .projects-container {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 25px;
      max-width: 1200px;
     margin: 0 auto;
     padding: 20px;
    }

    .project-card {
      background: #fff;
      border-radius: 12px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      transition: transform 0.3s ease, box-shadow 0.3s ease;

    }

    .project-card:hover {
      transform: translateY(-6px);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }

    .project-card img {
      width: 100%;
      height: 200px;
      object-fit: cover;
    }


    .project-content {
      flex: 1;
      padding: 20px;
    }

      body.dark-mode .project-content h3 {
        color: white;
    }

    body.dark-mode .project-content p{
        color: white;
    }

    .project-content h3 {
      margin: 0 0 10px;
      font-size: 1.2rem;
      color: #111;
    }

    .project-content p {
      color: #555;
      font-size: 0.95rem;
      line-height: 1.5;
      margin-bottom: 15px;
    }

    .demo-link {
      display: inline-block;
      background-color: #0078ff;
      color: white;
      text-decoration: none;
      padding: 10px 16px;
      border-radius: 6px;
      font-weight: 500;
      transition: background 0.3s ease;
    }

    .demo-link:hover {
      background-color: #005fcc;
    }
