/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

:root {
    --bg-color: #1f242d;
    --second-bg-color: #323946;
    --text-color: #fff;
    --main-color: #0ef;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

section {
    min-height: unset;
    padding: 4rem 5% 2rem;
    width: 100%;
}

.home, section:first-of-type {
    padding-top: 10rem;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 5%;
    background: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.header.sticky {
    border-bottom: .1rem solid rgba(0, 0, 0, .2);
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 600;
    cursor: default;
}

.navbar a {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-left: 4rem;
    transition: .3s;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

#menu-icon {
    font-size: 3rem;
    color: var(--text-color);
    display: none;
    cursor: pointer;
}

.home {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 4rem 5% 2rem;
    width: 100%;
}

.home-content {
    flex: 1 1 300px;
    max-width: 600px;
    padding: 0 1rem;
    width: 100%;
}

.home-img {
    flex: 1 1 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 1rem;
    width: 100%;
}

.home-img img {
    width: 100%;
    max-width: 280px;
    height: auto;
    object-fit: contain;
}

h1, h2, h3, p {
    margin: 0 0 1rem 0;
}

.home-content h3 {
    font-size: clamp(1.8rem, 2.5vw, 2.4rem);
    margin-bottom: 1rem;
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 2rem;
}

span {
    color: var(--main-color);
}

.home-content h1 {
    font-size: clamp(3rem, 6vw, 4.8rem);
    line-height: 1.2;
}

.home-content p {
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    line-height: 1.6;
    margin-bottom: 2rem;
    text-align: justify; /* ✅ */
}

.social-media {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    color: var(--main-color);
    transition: .5s ease;
}

.social-media a:hover {
    background: var(--main-color);
    color: var(--second-bg-color);
    box-shadow: 0 0 1rem var(--main-color);
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    color: var(--second-bg-color);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
    margin-bottom: 2rem;
}

.btn:hover {
    box-shadow: none;
}

.about {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    background: var(--second-bg-color);
    width: 100%;
    padding: 4rem 5% 2rem;
}

.heading {
    text-align: center;
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    margin-bottom: 2rem;
}

.about-content h2 {
    text-align: left;
    line-height: 1.5;
}

.about-content h3 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.about-content p {
    font-size: 1.6rem;
    margin-bottom: 2rem;
    text-align: justify; /* ✅ */
}

/* === SKILLS SECTION === */
.skills {
    background: var(--second-bg-color);
    padding: 4rem 5% 2rem;
    width: 100%;
}

.skills h2 {
    margin-bottom: 3rem;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    width: 100%;
}

@media (min-width: 1024px) {
    .skills-container {
        grid-template-columns: repeat(4, 1fr); /* ✅ 4 per row on larger screens */
    }
}

.skills-box {
    border-radius: 2rem;
    box-shadow: 0 0 1rem var(--bg-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-color);
    transition: transform 0.5s;
}

.skills-box img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    background: #fff;
    padding: 2rem;
    transition: 0.5s;
}

.skills-box:hover {
    transform: scale(1.05);
    box-shadow: 0 0 2rem var(--main-color);
}

.skills-layer {
    width: 100%;
    text-align: center;
    padding: 1.5rem 0;
    background: linear-gradient(rgba(0,0,0,0.1), var(--main-color));
}

.skills-layer h4 {
    font-size: 2rem;
    color: var(--text-color);
    font-weight: 600;
}

/* === PROJECT SECTION === */
.project {
    background: var(--second-bg-color);
    width: 100%;
    padding: 4rem 5% 2rem;
}

.project h2 {
    margin-bottom: 3rem;
}

.project-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* ✅ 3 per row */
    gap: 2rem;
    width: 100%;
}

@media (max-width: 992px) {
    .project-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .project-container {
        grid-template-columns: 1fr;
    }
}

.project-box {
    position: relative;
    border-radius: 2rem;
    overflow: hidden;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;             
    aspect-ratio: 4 / 3;       
}

.project-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;         
    transition: .5s ease;
}

.project-box:hover img {
    transform: scale(1.1);
}

.project-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, .1), var(--main-color));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    transform: translateY(100%);
    transition: .5s ease;
}

.project-box:hover .project-layer {
    transform: translateY(0);
}

.project-layer h4 {
    font-size: clamp(1.8rem, 3vw, 3rem);
}

.project-layer p {
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    margin: .3rem 0 1rem;
}

.project-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.project-layer .btn-download {
    padding: 0.8rem 1.6rem;
    background: var(--text-color);
    color: var(--second-bg-color);
    border-radius: 2rem;
    font-weight: bold;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 0 0.8rem var(--main-color);
    transition: .3s ease;
}

.project-layer .btn-download:hover {
    background: var(--main-color);
    color: var(--bg-color);
}

/* === CONTACT === */
.contact {
    padding: 4rem 5% 2rem;
    width: 100%;
}

.contact h2 {
    margin-bottom: 3rem;
}

.contact form {
    max-width: 70rem;
    margin: 1rem auto 3rem;
    text-align: center;
    width: 90%;
}

.contact form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    width: 100%;
}

.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--second-bg-color);
    border-radius: .8rem;
    margin: .7rem 0;
}

.contact form .input-box input {
    width: 49%;
}

.contact form textarea {
    resize: none;
}

.contact form .btn {
    margin-top: 2rem;
    cursor: pointer;
}

/* === FOOTER === */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 5%;
    background: var(--second-bg-color);
    width: 100%;
}

.footer-text p {
    font-size: 1.6rem;
}

.footer-iconTap a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .5s ease;
}

.footer-iconTap a:hover {
    box-shadow: 0 0 1rem var(--main-color);
}

.footer-iconTap i {
    font-size: 2.4rem;
    color: var(--second-bg-color);
}

/* === Responsive === */
@media (max-width: 768px) {
    #menu-icon {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-color);
        flex-direction: column;
        align-items: center;
        display: none;
    }

    .navbar.active {
        display: flex;
    }

    .navbar a {
        margin: 1.5rem 0;
        font-size: 1.8rem;
    }

    .header, .footer {
        padding: 1.5rem 5%;
    }

    .contact form .input-box input {
        width: 100%;
    }

    .home, .about, .skills, .project, .contact {
        padding: 3rem 5% 2rem;
    }

    .home-img img {
        max-width: 220px;
    }
}

@media (max-width: 480px) {
    section {
        padding: 2rem 4% 1rem;
    }

    .home, .about, .skills, .project, .contact {
        padding: 2rem 4% 1rem;
    }

    .home-img img {
        max-width: 180px;
    }

    .navbar a {
        font-size: 1.6rem;
    }

    .btn {
        font-size: 1.4rem;
        padding: 0.8rem 2rem;
    }
}

/* Optional: Mobile-specific image */
.home-img.mobile-img {
  display: none;
}

@media (max-width: 768px) {
  .home {
    flex-direction: column;
  }
  .home-img.desktop-img {
    display: none;
  }
  .home-img.mobile-img {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
  }
  .home-img.mobile-img img {
    max-width: 220px;
  }
}


.tools-panel {
  text-align: center;
  margin-top: 2rem;
}

.tools-panel .btn {
  margin: 0.5rem;
  font-size: 1.4rem;
  padding: 0.8rem 2rem;
  border-radius: 2rem;
  background: var(--main-color);
  color: var(--second-bg-color);
  cursor: pointer;
  transition: 0.3s ease;
}

.tools-panel .btn:hover {
  box-shadow: 0 0 0.8rem var(--main-color);
}
#tool-message {
  font-size: 1.4rem;
  margin-top: 0.5rem;
  color: var(--main-color);
}
