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

body {
    font-family: Helvetica, Arial, sans-serif;
    background: #fafafa;
    color: #111;
    line-height: 1.6;
}


/* ============================= */
/*            NAVIGATION         */
/* ============================= */

.nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(6px);
    z-index: 10;
}

.nav nav a {
    margin-left: 25px;
    text-decoration: none;
    color: #111;
    transition: opacity .25s;
}

.nav nav a:hover {
    opacity: 0.5;
}


/* ============================= */
/*         HERO SECTION          */
/* ============================= */

.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 40px;

    /* animation initial state */
    opacity: 0;
    transform: translateY(-40px);
    transition: opacity .9s ease, transform 1s ease;
}

.hero.animate {
    opacity: 1;
    transform: translateY(0);
}

.hero h1, .hero p {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity .9s ease .2s, transform 1s ease .2s;
}

.hero.animate h1,
.hero.animate p {
    opacity: 1;
    transform: translateY(0);
}

.hero h1 {
    font-size: 64px;
    font-weight: 300;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    max-width: 500px;
}


/* ============================= */
/*            PORTFOLIO          */
/* ============================= */

.portfolio {
    padding: 120px 40px 80px;
}

.portfolio h2 {
    font-size: 28px;
    margin-bottom: 40px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.item {
    background: #eee;
    cursor: pointer;
    overflow: hidden;
}

.ph {
    background: #dcdcdc;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 20px;
    transition: transform .4s ease;
}

.item:hover .ph {
    transform: scale(1.05);
}


/* ============================= */
/*        ABOUT + CONTACT        */
/* ============================= */

.about, .contact {
    padding: 120px 40px;
}

.about h2, .contact h2 {
    font-size: 28px;
    margin-bottom: 20px;
}


/* ============================= */
/*             FOOTER            */
/* ============================= */

footer {
    padding: 60px 40px;
    text-align: center;
    color: #888;
}


/* ============================= */
/*         MOBILE MENU           */
/* ============================= */

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 20;
}

.hamburger span {
    width: 26px;
    height: 2px;
    background: #111;
    transition: all .3s ease;
}

/* Hamburger → X */
.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* Mobile menu container */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    background: #fffffff0;
    padding-top: 100px;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    transform: translateY(-100%);
    transition: transform .35s ease;
    backdrop-filter: blur(10px);
    z-index: 15;
}

.mobile-menu a {
    font-size: 22px;
    text-decoration: none;
    color: #111;
    font-weight: 300;
}

.mobile-menu.active {
    transform: translateY(0);
}


/* MOBILE LAYOUT RULES */
@media (max-width: 820px) {

    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}
