@import url('https://fonts.googleapis.com/css2?family=Cutive+Mono&family=Delicious+Handrawn&family=Montserrat:wght@300;400;500;600;700&family=Noto+Sans+Mahajani&display=swap');

/* ---------- Base ---------- */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #24252A;
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

button {
    cursor: pointer;
}

button:hover {
    box-shadow: 0px 0px 15px black;
}

/* Shared section background */
.section-home,
.section-about,
.section-project,
.section-contact {
    background: url(images/bg.webp) no-repeat center / cover;
    min-height: 100vh;
}

/* ---------- Navigation ---------- */

.div-pf {
    position: fixed;
    top: 40px;
    left: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    width: 100%;
    padding: 0 10%;
    background: url(images/bg.webp) center / cover;
    box-shadow: 0 10px 20px black;
}

.pf-h1 a {
    text-decoration: none;
}

.pf-h1 h1 {
    font-size: 2rem;
    white-space: nowrap;
}

.h1-s {
    color: aliceblue;
}

.span-h1 {
    color: #00fbfb;
}

.ul-nav {
    display: flex;
    gap: 70px;
}

.ul-nav li {
    list-style: none;
}

.ul-nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.5s;
}

.ul-nav a:hover,
.pf-ul .ul-nav a.active {
    color: #00fbfb;
}

/* Hamburger button (shown on small screens only) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 42px;
    height: 42px;
    padding: 8px;
    background: none;
    border: none;
}

.nav-toggle:hover {
    box-shadow: none;
}

.nav-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: aliceblue;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.navigation.open .nav-toggle span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.navigation.open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

.navigation.open .nav-toggle span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ---------- Home ---------- */

.section-home {
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 140px 10% 60px;
}

.content {
    flex: 1 1 50%;
    max-width: 560px;
}

.content h1 {
    font-family: 'Cutive Mono', monospace;
    font-size: clamp(1.35rem, 3vw, 29px);
    font-weight: 600;
}

.content h3 {
    font-size: clamp(1.1rem, 2.5vw, 25px);
    font-weight: 600;
    color: aqua;
}

.content p {
    margin-top: 8px;
    line-height: 1.6;
}

.btn {
    margin-top: 16px;
}

.btn a {
    display: inline-block;
    padding: 12px 20px;
    border: 1px solid aquamarine;
    border-radius: 10px;
    color: aliceblue;
    text-decoration: none;
    transition: ease-in 0.2s;
}

.btn a:hover {
    color: #24252A;
    background-color: aquamarine;
}

.me {
    flex: 1 1 40%;
    display: flex;
    justify-content: center;
}

.me img {
    width: 100%;
    max-width: 321px;   /* same size as the old 400px-tall image */
    height: auto;
    animation: fadeIn 3s;
    transition: transform 0.7s;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* ---------- About ---------- */

.section-about {
    color: aliceblue;
    text-align: center;
    padding: 140px 5% 60px;
}

.container-about {
    margin-bottom: 40px;
}

.container-about h1 {
    font-size: clamp(1.6rem, 4vw, 2rem);
}

.container-about p {
    margin-top: 10px;
    line-height: 1.6;
}

.about-img {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.about-img img {
    flex: 1 1 200px;
    min-width: 0;
    max-width: 340px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 20px;
    animation: showup 1.5s;
    transition: transform 0.5s, box-shadow 0.5s;
}

@keyframes showup {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Projects ---------- */

.section-project {
    color: aliceblue;
    text-align: center;
    padding: 140px 5% 60px;
}

.div-project h1 {
    font-size: clamp(1.6rem, 4vw, 2rem);
}

.myproject {
    max-width: 500px;
    margin: 60px auto 0;
}

.myproject img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 3;
    object-fit: cover;
    border-radius: 10px;
}

.div-project-img p {
    margin-top: 12px;
}

.button-project {
    margin-top: 50px;
}

.button-project button {
    height: 45px;
    width: 110px;
    background-color: green;
    border: none;
    color: white;
    border-radius: 5px;
    transition: all 0.5s;
}

/* ---------- Contact ---------- */

.section-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 5% 60px;
}

.container-contact {
    width: 100%;
    max-width: 900px;
    border: 1px solid white;
    padding: 20px 40px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 40px;
}

.contactme {
    grid-column: 1 / -1;
    color: aliceblue;
    text-align: center;
}

.social {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    padding-left: 20px;
}

.email,
.viber {
    display: flex;
    align-items: center;
    gap: 14px;
}

.img-icon,
.viber-icon {
    width: 38px;
    display: flex;
    justify-content: center;
}

.img-icon img {
    display: block;
    height: 30px;
}

.viber-icon img {
    display: block;
    height: 38px;
}

.email a,
.viber a {
    font-weight: bolder;
    text-decoration: none;
    color: white;
    transition: color 0.5s;
}

.email a:hover,
.viber a:hover {
    color: aqua;
}

.media ul {
    display: flex;
    gap: 25px;
}

.media ul li {
    list-style: none;
    transition: transform 0.5s;
}

.media img {
    display: block;
}

.button-resume,
.button-submit {
    width: 150px;
    padding: 15px;
    background-color: green;
    border: none;
    border-radius: 7px;
    color: aliceblue;
    transition: all 0.5s;
    font-weight: bolder;
}

.textname {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.inputbox,
textarea {
    width: 100%;
    font-size: 14px;
    line-height: 1.5;
    padding: 10px;
    background: #312d2d;
    color: aliceblue;
    border: none;
}

.inputbox {
    height: 50px;
}

textarea {
    resize: none;
}

.submit {
    margin-top: 30px;
}

/* ---------- Footer ---------- */

.div-ft {
    background-color: #24252A;
    box-shadow: 0 -5px 15px black;
    padding: 15px 5%;
    text-align: center;
}

.h-ft h1 {
    font-size: clamp(0.75rem, 2vw, 1.125rem);
    color: aliceblue;
}

/* ---------- Hover effects (mouse / trackpad only) ---------- */

@media (hover: hover) {
    .me img:hover {
        transform: scale(1.2);
    }

    .about-img img:hover {
        position: relative;
        z-index: 1;
        transform: scale(1.2);
        box-shadow: 10px 10px 20px black;
    }

    .button-project button:hover,
    .button-resume:hover,
    .button-submit:hover {
        transform: scale(1.2);
    }

    .media ul li:hover {
        transform: scale(1.5);
    }
}

/* ---------- Tablet / small laptop ---------- */

@media (max-width: 1024px) {
    .div-pf {
        padding: 0 5%;
    }

    .ul-nav {
        gap: 35px;
    }

    .section-home {
        padding-left: 5%;
        padding-right: 5%;
    }
}

/* ---------- Mobile ---------- */

@media (max-width: 768px) {
    .div-pf {
        top: 0;
        height: 64px;
        padding: 0 20px;
    }

    .pf-h1 h1 {
        font-size: 1.6rem;
    }

    .nav-toggle {
        display: flex;
    }

    /* Collapsible dropdown menu */
    .pf-ul {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #24252A;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .navigation.open .pf-ul {
        max-height: 300px;
        box-shadow: 0 10px 20px black;
    }

    .ul-nav {
        flex-direction: column;
        gap: 0;
    }

    .ul-nav a {
        display: block;
        padding: 14px 24px;
        border-top: 1px solid #312d2d;
    }

    .section-home {
        flex-direction: column-reverse;
        justify-content: center;
        text-align: center;
        gap: 24px;
        padding: 100px 6% 50px;
    }

    .content,
    .me {
        flex: none;
        max-width: 100%;
    }

    .me img {
        max-width: 220px;
    }

    .section-about,
    .section-project,
    .section-contact {
        min-height: auto;
        padding: 100px 5% 50px;
    }

    .myproject {
        margin-top: 40px;
    }

    .button-project {
        margin-top: 35px;
    }

    .container-contact {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 30px;
    }

    .social {
        align-items: center;
        padding-left: 0;
    }

    .submit {
        text-align: center;
    }
}

/* ---------- Small phones ---------- */

@media (max-width: 480px) {
    .pf-h1 h1 {
        font-size: 1.35rem;
    }

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

    .me img {
        max-width: 180px;
    }

    .about-img img {
        max-width: 260px;
        border-radius: 12px;
    }

    .container-contact {
        border: none;
        padding: 10px 0;
    }
}
