/* =========================================================
   RAYAN ANWAR — PORTFOLIO
   Main Stylesheet
========================================================= */


/* =========================================================
   01. ROOT
========================================================= */

:root {
    --cream: #e0deda;
    --cream-light: #e0deda;
    --cream-dark: #e0deda;

    --green: #58733a;
    --green-dark: #293b21;
    --green-deep: #1d2b18;
    --green-light: #78945a;

    --black: #151713;
    --gray: #686b63;
    --white: #ffffff;

    --line: rgba(41, 59, 33, 0.15);

    --container: 1240px;

    --transition: 0.35s ease;
}


/* =========================================================
   02. RESET
========================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--cream);
    color: var(--black);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    overflow-x: hidden;
}

body,
button,
a {
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button {
    border: 0;
    background: none;
}


/* =========================================================
   03. GLOBAL
========================================================= */

.container {
    width: min(
        var(--container),
        calc(100% - 80px)
    );

    margin: 0 auto;
}

.section-label {
    margin-bottom: 18px;

    color: var(--green);

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.section-heading {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 50px;

    margin-bottom: 60px;
}

.section-heading h2 {
    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(42px, 5vw, 68px);
    font-weight: 400;

    line-height: 1.02;
    letter-spacing: -2px;
}

.section-text {
    max-width: 340px;

    color: var(--gray);

    font-size: 14px;
    line-height: 1.8;
}


/* =========================================================
   04. HEADER
========================================================= */

.header {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;

    z-index: 1000;

    background: #e0deda;

    border-bottom: 1px solid transparent;

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    transition:
        background var(--transition),
        border-color var(--transition);
}

.header.scrolled {
    border-bottom-color: var(--line);
}

.header-container {
    height: 88px;

    display: flex;

    align-items: center;
    justify-content: space-between;
}


/* LOGO */

.logo {
    width: 58px;
    height: 58px;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.logo img {
    width: 100%;
    height: 100%;

    object-fit: contain;
    
}


/* NAVIGATION */

.navbar {
    display: flex;

    align-items: center;

    gap: 42px;
}

.navbar a {
    position: relative;

    color: var(--black);

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 1.6px;

    text-transform: uppercase;

    transition: color var(--transition);
}

.navbar a::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: -10px;

    width: 0;
    height: 1px;

    background: var(--green);

    transform: translateX(-50%);

    transition: width var(--transition);
}

.navbar a:hover {
    color: var(--green);
}

.navbar a:hover::after {
    width: 20px;
}


/* HEADER CONTACT */

.header-contact {
    padding: 13px 22px;

    border: 1px solid var(--green);

    border-radius: 50px;

    color: var(--green);

    font-size: 10px;
    font-weight: 600;

    letter-spacing: 1.5px;

    text-transform: uppercase;

    transition:
        background var(--transition),
        color var(--transition);
}

.header-contact:hover {background: var(--green);

    color: var(--white);
}


/* MOBILE MENU BUTTON */

.menu-btn {
    display: none;

    width: 44px;
    height: 44px;

    border: 1px solid var(--line);

    cursor: pointer;
}

.menu-btn span {
    display: block;

    width: 18px;
    height: 1px;

    margin: 4px auto;

    background: var(--black);

    transition: var(--transition);
}


/* =========================================================
   05. HERO
========================================================= */

.hero {
    position: relative;

    min-height: 100vh;

    padding-top: 88px;

    display: flex;

    align-items: center;

    overflow: hidden;
}

.hero::before {
    content: "";

    position: absolute;

    width: 700px;
    height: 700px;

    right: -250px;
    top: 100px;

    background:
        radial-gradient(
            circle,
            rgba(88, 115, 58, 0.13),
            transparent 70%
        );

    pointer-events: none;
}

.hero-container {
    min-height: calc(100vh - 88px);

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    align-items: center;

    gap: 50px;
}


/* HERO CONTENT */

.hero-content {
    padding-left: 15px;
}

.hero-small-title {
    display: flex;

    align-items: center;

    gap: 13px;

    margin-bottom: 25px;

    color: var(--green);

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 2.5px;

    text-transform: uppercase;
}

.hero-small-title::before {
    content: "";

    width: 30px;
    height: 1px;

    background: var(--green);
}

.hero h1 {
    margin-bottom: 22px;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(
        58px,
        7vw,
        100px
    );

    font-weight: 400;

    line-height: 0.91;

    letter-spacing: -4px;
}

.hero h2 {
    margin-bottom: 28px;

    color: var(--green);

    font-size: clamp(
        17px,
        2vw,
        24px
    );

    font-weight: 400;

    letter-spacing: 7px;

    text-transform: uppercase;
}

.hero-description {
    max-width: 480px;

    margin-bottom: 35px;

    color: var(--gray);

    font-size: 15px;

    line-height: 1.85;
}


/* HERO BUTTONS */

.hero-buttons {
    display: flex;

    align-items: center;

    gap: 13px;
}

.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 20px;

    min-height: 49px;

    padding: 0 22px;

    font-size: 10px;
    font-weight: 600;

    letter-spacing: 1.5px;

    text-transform: uppercase;

    transition: var(--transition);
}

.btn-primary {
    background: var(--green);

    color: var(--white);
}

.btn-primary span {
    font-size: 16px;

    transition: transform var(--transition);
}

.btn-primary:hover {
    background: var(--green-dark);
}

.btn-primary:hover span {
    transform: translate(4px, -3px);
}

.btn-secondary {
    border: 1px solid var(--line);

    color: var(--green-dark);
}

.btn-secondary:hover {
    border-color: var(--green);

    background: rgba(88, 115, 58, 0.05);
}


/* HERO LOGO */

.hero-visual {
    position: relative;

    height: 650px;

    display: flex;

    align-items: center;
    justify-content: center;
}

.hero-logo {
    position: relative;

    z-index: 2;

    width: min(
        570px,
        95%
    );

    filter:
        drop-shadow(
            0 28px 35px
            rgba(40, 55, 32, 0.15)
        );

    animation:
        floatingLogo 6s ease-in-out infinite;
}

@keyframes floatingLogo {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}


/* HERO CIRCLE */

.hero-circle {
    position: absolute;

    width: 500px;
    height: 500px;

    border:
        1px solid
        rgba(88, 115, 58, 0.12);

    border-radius: 50%;
}

.hero-circle::before {
    content: "";

    position: absolute;

    inset: 45px;

    border:
        1px solid
        rgba(88, 115, 58, 0.08);

    border-radius: 50%;
}


/* =========================================================
   06. WORK========================================================= */

.work {
    padding: 135px 0;

    border-top: 1px solid var(--line);
}

.projects {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 25px;
}

.project-card {
    overflow: hidden;

    background: var(--cream-light);

    border: 1px solid var(--line);

    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.project-card:hover {
    transform: translateY(-7px);

    box-shadow:
        0 25px 55px
        rgba(35, 48, 27, 0.11);
}


/* PROJECT IMAGE */

.project-image {
    height: 350px;

    overflow: hidden;

    background: var(--cream-dark);
}

.project-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.7s ease;
}

.project-card:hover
.project-image img {
    transform: scale(1.045);
}


/* PROJECT INFO */

.project-info {
    min-height: 105px;

    padding: 25px 28px;

    display: flex;

    align-items: center;
    justify-content: space-between;
}

.project-info span {
    color: var(--green);

    font-size: 9px;
    font-weight: 600;

    letter-spacing: 2px;

    text-transform: uppercase;
}

.project-info h3 {
    margin-top: 8px;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 25px;
    font-weight: 400;
}

.project-link {
    width: 44px;
    height: 44px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid var(--line);

    border-radius: 50%;

    color: var(--green);

    font-size: 18px;

    transition: var(--transition);
}

.project-card:hover .project-link {
    background: var(--green);

    color: var(--white);

    border-color: var(--green);
}


/* =========================================================
   07. ABOUT
========================================================= */

.about {
    padding: 140px 0;

    border-top: 1px solid var(--line);
}

.about-container {
    display: grid;

    grid-template-columns:
        minmax(0, 0.85fr)
        minmax(0, 1.15fr);

    gap: 100px;
}

.about-heading h2 {
    max-width: 600px;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(
        43px,
        5vw,
        68px
    );

    font-weight: 400;

    line-height: 1.03;

    letter-spacing: -2px;
}

.about-content {
    padding-top: 35px;

    max-width: 650px;
}

.about-content p {
    color: var(--gray);

    font-size: 17px;

    line-height: 1.9;
}

.about-content p + p {
    margin-top: 25px;
}


/* =========================================================
   08. SKILLS
========================================================= */

.skills {
    padding: 120px 0;

    background:
        linear-gradient(
            135deg,
            var(--green-dark),
            var(--green-deep)
        );

    color: var(--white);
}

.skills .section-label {
    color: #a3bd7d;
}

.skills-heading {
    margin-bottom: 60px;
}

.skills-heading h2 {
    color: var(--white);
}

.skills-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    border-top:
        1px solid
        rgba(255, 255, 255, 0.13);
}

.skill-item {
    min-height: 240px;

    padding: 35px 28px;

    border-right:
        1px solid
        rgba(255, 255, 255, 0.13);
}

.skill-item:last-child {
    border-right: 0;
}

.skill-item > span {
    color: #a3bd7d;

    font-size: 10px;
    letter-spacing: 2px;
}

.skill-item h3 {
    margin: 28px 0 13px;

    font-size: 18px;
    font-weight: 500;
}

.skill-item p {
    max-width: 230px;

    color:
        rgba(255, 255, 255, 0.56);

    font-size: 13px;

    line-height: 1.75;
}


/* =========================================================
   09. CONTACT
========================================================= */

.contact {
    padding: 160px 0;

    text-align: center;
}

.contact-container {
    display: flex;

    flex-direction: column;

    align-items: center;
}

.contact h2 {
    margin-bottom: 28px;font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(
        50px,
        7vw,
        95px
    );

    font-weight: 400;

    line-height: 0.96;

    letter-spacing: -3px;
}

.contact-container > p:not(.section-label) {
    margin-bottom: 25px;

    color: var(--gray);

    font-size: 15px;
}

.contact-email {
    color: var(--green);

    font-size: 17px;

    border-bottom:
        1px solid
        var(--green);

    padding-bottom: 7px;

    transition: color var(--transition);
}

.contact-email:hover {
    color: var(--green-dark);
}


/* =========================================================
   10. FOOTER
========================================================= */

.footer {
    padding: 30px 0;

    border-top: 1px solid var(--line);
}

.footer-container {
    display: flex;

    align-items: center;
    justify-content: space-between;
}

.footer-logo {
    width: 48px;
    height: 48px;

    overflow: hidden;
}

.footer-logo img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}

.footer-container p {
    color: var(--gray);

    font-size: 11px;
}

.back-top {
    color: var(--green);

    font-size: 10px;
    font-weight: 600;

    letter-spacing: 1.5px;

    text-transform: uppercase;
}


/* =========================================================
   11. MOBILE MENU
========================================================= */

.menu-btn.active span:nth-child(1) {
    transform:
        translateY(5px)
        rotate(45deg);
}

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

.menu-btn.active span:nth-child(3) {
    transform:
        translateY(-5px)
        rotate(-45deg);
}


/* =========================================================
   12. TABLET
========================================================= */

@media (max-width: 1000px) {

    .container {
        width: min(
            900px,
            calc(100% - 50px)
        );
    }

    .navbar {
        gap: 25px;
    }

    .hero-container {
        gap: 20px;
    }

    .hero-visual {
        height: 530px;
    }

    .hero-circle {
        width: 410px;
        height: 410px;
    }

    .about-container {
        gap: 55px;
    }

    .skills-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .skill-item:nth-child(2) {
        border-right: 0;
    }

    .skill-item:nth-child(-n + 2) {
        border-bottom:
            1px solid
            rgba(255, 255, 255, 0.13);
    }
}


/* =========================================================
   13. MOBILE
========================================================= */

@media (max-width: 750px) {

    .container {
        width: calc(100% - 36px);
    }


    /* HEADER */

    .header-container {
        height: 72px;
    }

    .logo {
        width: 50px;
        height: 50px;
    }

    .header-contact {
        display: none;
    }

    .menu-btn {
        display: block;
    }

    .navbar {
        position: absolute;

        top: 72px;
        left: 18px;
        right: 18px;

        display: none;

        flex-direction: column;

        align-items: flex-start;

        gap: 23px;

        padding: 25px;

        background: var(--cream-light);

        border: 1px solid var(--line);

        box-shadow:
            0 20px 45px
            rgba(30, 40, 25, 0.10);
    }

    .navbar.active {
        display: flex;
    }


    /* HERO */

    .hero {
        padding-top: 72px;
    }

    .hero-container {
        min-height: auto;

        grid-template-columns: 1fr;

        gap: 20px;

        padding-top: 80px;
        padding-bottom: 90px;
    }

    .hero-content {
        padding-left: 0;
    }

    .hero h1 {
        font-size:
            clamp(
                48px,
                14vw,
                70px
            );

        letter-spacing: -2.5px;
    }

    .hero h2 {
        font-size: 15px;

        letter-spacing: 5px;
    }

    .hero-description {
        font-size: 14px;
    }

    .hero-visual {
        height: 400px;
    }

    .hero-logo {
        width: 90%;
    }.hero-circle {
        width: 320px;
        height: 320px;
    }


    /* WORK */

    .work {
        padding: 90px 0;
    }

    .section-heading {
        display: block;

        margin-bottom: 42px;
    }

    .section-text {
        margin-top: 22px;
    }

    .projects {
        grid-template-columns: 1fr;

        gap: 20px;
    }

    .project-image {
        height: 270px;
    }

    .project-info {
        padding: 22px;
    }


    /* ABOUT */

    .about {
        padding: 90px 0;
    }

    .about-container {
        grid-template-columns: 1fr;

        gap: 35px;
    }

    .about-content {
        padding-top: 0;
    }

    .about-content p {
        font-size: 15px;
    }


    /* SKILLS */

    .skills {
        padding: 90px 0;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .skill-item {
        min-height: auto;

        padding: 30px 20px;

        border-right: 0;

        border-bottom:
            1px solid
            rgba(255, 255, 255, 0.13);
    }

    .skill-item:last-child {
        border-bottom: 0;
    }


    /* CONTACT */

    .contact {
        padding: 100px 0;
    }

    .contact h2 {
        font-size: 51px;

        letter-spacing: -2px;
    }


    /* FOOTER */

    .footer {
        padding: 25px 0;
    }

    .footer-container {
        flex-direction: column;

        gap: 18px;

        text-align: center;
    }
}


/* =========================================================
   14. SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .hero-container {
        padding-top: 60px;
    }

    .hero h1 {
        font-size: 45px;
    }

    .hero h2 {
        font-size: 13px;

        letter-spacing: 4px;
    }

    .hero-buttons {
        flex-direction: column;

        align-items: flex-start;
    }

    .hero-visual {
        height: 330px;
    }

    .hero-circle {
        width: 270px;
        height: 270px;
    }

    .contact h2 {
        font-size: 42px;
    }
}/* =========================================================
   SCROLL REVEAL
========================================================= */

.reveal {
    opacity: 0;

    transform: translateY(30px);

    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.reveal.show {
    opacity: 1;

    transform: translateY(0);
}


/* Different delays */

.project-card:nth-child(2) {
    transition-delay: 0.08s;
}

.project-card:nth-child(3) {
    transition-delay: 0.16s;
}

.project-card:nth-child(4) {
    transition-delay: 0.24s;
}

.skill-item:nth-child(2) {
    transition-delay: 0.08s;
}

.skill-item:nth-child(3) {
    transition-delay: 0.16s;
}

.skill-item:nth-child(4) {
    transition-delay: 0.24s;
}


/* Accessibility */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

}/* =========================================================
   CONTACT LINKS
========================================================= */

.contact-links {
    width: min(100%, 720px);

    margin-top: 45px;

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.contact-item {
    min-height: 105px;

    padding: 22px 25px;

    display: flex;

    align-items: center;

    gap: 15px;

    text-align: left;

    border-right: 1px solid var(--line);

    transition: background var(--transition);
}

.contact-item:last-child {
    border-right: none;
}

.contact-item:hover {
    background: rgba(88, 115, 58, 0.06);
}

.contact-icon {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid var(--line);

    border-radius: 50%;

    color: var(--green);

    font-size: 17px;
}

.contact-item div {
    display: flex;

    flex-direction: column;

    gap: 6px;
}

.contact-item small {
    color: var(--gray);

    font-size: 9px;

    letter-spacing: 1.5px;

    text-transform: uppercase;
}

.contact-item strong {
    color: var(--black);

    font-size: 12px;

    font-weight: 500;

    word-break: break-word;
}


/* Mobile */

@media (max-width: 750px) {

    .contact-links {
        grid-template-columns: 1fr;

        width: 100%;
    }

    .contact-item {
        border-right: none;

        border-bottom: 1px solid var(--line);
    }

    .contact-item:last-child {
        border-bottom: none;
    }
.navbar {
    display: none;
}

.navbar.active {
    display: flex;
}
}

.contact-item > img {
    width: 34px;
    height: 34px;

    object-fit: contain;

    flex-shrink: 0;

    transition: transform 0.3s ease;
}

.contact-item:hover > img {
    transform: scale(1.1);
}
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

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

@media (max-width: 750px) {

 
    .navbar.active a {
        animation: mobileMenuItem 0.45s ease both;
        color: #293b21;
    
    }

    .navbar.active a:nth-child(1) {
        animation-delay: 0.05s;
        
    }

    .navbar.active a:nth-child(2) {
        animation-delay: 0.10s;
    }

    .navbar.active a:nth-child(3) {
        animation-delay: 0.15s;
    }

    .navbar.active a:nth-child(4) {
        animation-delay: 0.20s;
    }

    .navbar.active a:nth-child(5) {
        animation-delay: 0.25s;
    }

}


@keyframes mobileMenuItem {

    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}
/* =========================================================
   CONTACT ANIMATION
========================================================= */

.contact h2,
.contact-links .contact-item {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.contact.show h2 {
    opacity: 1;
    transform: translateY(0);
}

.contact.show .contact-item {
    opacity: 1;
    transform: translateY(0);
}

.contact.show .contact-item:nth-child(1) {
    transition-delay: 0.15s;
}

.contact.show .contact-item:nth-child(2) {
    transition-delay: 0.25s;
}

.contact.show .contact-item:nth-child(3) {
    transition-delay: 0.35s;
}








/* =========================================================
   WORK — REALISTIC LAPTOP MOCKUP
========================================================= */

.project-image {
    position: relative;

    width: 100%;
    height: 350px;

    overflow: hidden;

    display: flex;
    align-items: flex-start;
    justify-content: center;

    background:  #677b5cd1 100%;

    border-radius: 16px;

    padding: 22px 20px 0;

    box-sizing: border-box;
}


/* Laptop screen / website screenshot */
.project-image img {
    position: relative;

    z-index: 3;

    width: 88%;
    height:88%;

    object-fit: contain;
    object-position: center center;

    background: #111;

    border: 8px solid #151515;
    border-bottom: 10px solid #151515;

    border-radius: 12px 12px 5px 5px;

    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.18),
        0 18px 35px rgba(0, 0, 0, 0.16);

    transition:
        transform 0.5s ease,
        box-shadow 0.5s ease;
}


/* Laptop base */
.project-image::after {
    content: "";

    position: absolute;

    z-index: 2;

    left: 8%;
    right: 8%;
    bottom: 18px;

    height: 18px;

    background:
        linear-gradient(
            to bottom,
            #d9d9d9 0%,
            #a9a9a9 45%,
            #777 100%
        );

    border-radius: 2px 2px 12px 12px;

    box-shadow:
        0 5px 10px rgba(0, 0, 0, 0.18),
        0 12px 20px rgba(0, 0, 0, 0.12);
}


/* Laptop base front edge */
.project-image::before {
    content: "";

    position: absolute;

    z-index: 4;

    left: 14%;
    right: 14%;
    bottom: 14px;

    height: 5px;

    background: #696969;

    border-radius: 0 0 10px 10px;
}


/* Hover */
.project-card:hover .project-image img {
    transform: translateY(-7px);

    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.20),
        0 25px 45px rgba(0, 0, 0, 0.18);
}








.logo img {
    width: 110px !important;
    height: 110px !important;
    max-width: none !important;
    max-height: none !important;
}



@media (max-width: 768px) {

    .hero-visual {
        display: none;
    }

}

/* ================= MOBILE + IPAD HERO ================= */

@media (max-width: 1024px) {

    .hero {
        min-height: auto !important;
        height: auto !important;
        padding-top: 100px !important;
        padding-bottom:0px !important;
    }

    .hero-container {
        min-height: auto !important;
        height: auto !important;
    }

    .hero-content {
        margin: 0 !important;
    }

    .hero-visual {
        display: none;
    }

}


@media (max-width: 768px) {
    .hero-buttons {
        display: flex;
        flex-direction: row;
        gap: 12px;
        flex-wrap: nowrap;
    }
}



