/* Font import */
/* @import url('https://fonts.googleapis.com/css2?family=Yeseva+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&family=Yeseva+One&display=swap'); */
/* Setting color variable */
:root {
    --color-text: #ccc;
    --color-bg: #011222;
    --color-bg-transparent: rgba(1, 18, 34, 0.5);
    /* --color-secondary: #578acd; */
    /* --color-primary: hsl(41, 96%, 56%); */
    --color-primary: #ffc300;
    --color-secondary: hsl(197, 88%, 58%);
    --color-tertiary: #fbf5df;
    --shadow-bg: 0 0.2rem 1rem var(--color-secondary);
    --section-space: 6rem;
    --radius-l: 1rem;
    --radius-m: 0.8rem;
    --radius-sm: 0.5rem;

    --step--2: clamp(0.7813rem, 0.7736rem + 0.0341vw, 0.8rem);
    --step--1: clamp(0.9375rem, 0.9119rem + 0.1136vw, 1rem);
    --step-0: clamp(1.125rem, 1.0739rem + 0.2273vw, 1.25rem);
    --step-1: clamp(1.35rem, 1.2631rem + 0.3864vw, 1.5625rem);
    --step-2: clamp(1.62rem, 1.4837rem + 0.6057vw, 1.9531rem);
    --step-3: clamp(1.944rem, 1.7405rem + 0.9044vw, 2.4414rem);
    --step-4: clamp(2.3328rem, 2.0387rem + 1.3072vw, 3.0518rem);
    --step-5: clamp(2.7994rem, 2.384rem + 1.8461vw, 3.8147rem);
}

/* Browser Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
@font-face {
    font-family: avi-title;
    src: url(assets/fonts/Avigea.ttf);
}
/* @font-face {
    font-family: ral-body;
    src: url(assets/fonts/Raleway-VariableFont_wght.ttf);
} */
@font-face {
    font-family: acre-body;
    src: url(assets/fonts/Acre-Medium.ttf);
}

html {
    background-color: var(--color-bg);
}
body {
    scroll-behavior: smooth;
    color: var(--color-text);
    font-family: acre-body, sans-serif;
    font-style: normal;
    font-size: var(--step--1);
    /* 1rem = 10px (because 62.5% of 16px = 10px) */
    /* font-size: 62.5%;  */
    /* max-width: auto; */
    /* height: 100%; */ /* this makes sticky nav to misbehave */
    /* font-family: 'Josefin Sans', sans-serif; */
    /* font-family: 'Ubuntu', sans-serif; */
    /* overflow-x: hidden; */ /* used to fix misbehave nav*/
}
h1 {
    font-size: var(--step-5);
}
h2 {
    font-size: var(--step-4);
}
h3 {
    font-size: var(--step-3);
}
h4 {
    font-size: var(--step-2);
}
h5 {
    font-size: var(--step-1);
}
h6 {
    font-size: var(--step-0);
}
p {
    font-size: var(--step--1);
}
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
}
button {
    all: unset; /* resets almost everything */
    cursor: pointer;
}
.container {
    margin: 0 auto;
    padding: 1rem;
    max-width: 1240px;
}

/* Nav section style */
.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* height: 5rem; */
    position: sticky;
    top: 0;
    background-color: rgba(1, 18, 34, 0.5); /* nearly opaque */
    backdrop-filter: blur(0.75rem);
    z-index: 9;
}

/* nav links style */
nav ul li {
    display: inline-block;
    padding-block-end: 0.5rem;
    /* font-family: 'Josefin Sans', sans-serif; */
    /* font-family: 'Ubuntu', sans-serif; */
    font-family: acre-body, sans-serif;
    cursor: pointer;
    position: relative;
    margin-inline: 1rem;
}
nav ul li:before {
    display: inline-block;
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    transform-origin: center;
    transform: scaleX(0);
    background-color: var(--color-secondary);
    border-radius: var(--radius-sm);
    width: 100%;
    height: 0.25rem;
    transition: transform 0.2s ease-in-out;
}
nav ul li:hover {
    color: var(--color-primary);
}
nav ul li:active::before,
nav ul li:focus::before,
nav ul li:visited::before,
nav ul li:hover::before {
    transform: scaleX(1);
}

/* Logo image style */
.logo-img {
    background: url(assets/image/Logo-7.png);
    background-repeat: no-repeat;
    background-size: contain; /* keeps aspect ratio, scales to fit */
    background-position: center; /* center the image */
    width: 2rem;
    height: 3rem;
    cursor: pointer;
    outline: none;
}
/* Hero section style */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* padding-block: var(--section-space); */
    height: 75vh;
}
.hero aside {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* .hero header > :last-child {
    padding-inline-start: 4rem;
    margin-inline-start: 3rem;
} */
.hero-title {
    /* color: var(--color-secondary); */
    background-image: linear-gradient(
        135deg,
        var(--color-secondary),
        var(--color-primary)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: avi-title, serif;
    line-height: 1;
    font-weight: normal;
    /* letter-spacing: 0.3rem; */
    /* font-family: 'Yeseva One', serif; */
}
/* .hero-title span {
    background-image: var(--color-primary);
} */
.hero-subtitle {
    /* font-size: var(--fs-600); */
    /* font-family: 'Josefin Sans', sans-serif; */
    /* font-family: 'Ubuntu', sans-serif; */
    font-family: acre-body, sans-serif;
    margin-block: 3rem;
}
.hero-image {
    position: relative;
    max-width: 50rem;
    height: auto;
}

/* Section Title Decoration style */
.section-decoration {
    position: relative;
    /* scroll-snap-align: start; */
}
.section-decoration::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 2rem;
    background-color: var(--color-secondary);
    width: 100%;
    height: 0.1rem;
    z-index: 1;
}
.section-title {
    display: inline-block;
    /* font-family: 'Yeseva One', serif; */
    font-family: avi-title, serif;
    font-weight: normal;
    line-height: 1.2;
    color: var(--color-primary);
    background-color: var(--color-bg);
    position: relative;
    z-index: 2;
}
.--left {
    transform: translateX(20rem);
}
.--right {
    transform: translateX(-20rem);
}

/* About me style */
.about-me {
    text-align: left;
}

.about-image img {
    width: clamp(30rem, 100vw + 0.5rem, 60rem);
    height: auto;
    margin-block: 2rem;
}
/* About content style */

.about-content-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-block: var(--section-space);
}
.about-content {
    padding-inline: 2rem;
    text-align: right;
}
.about-title {
    color: var(--color-primary);
}
.about-subtitle {
    color: var(--color-text);
    padding-block-end: 1rem;
}
.--details {
    text-align: left;
    color: var(--color-secondary);
}
.about-description {
    color: var(--color-text);
    text-align: justify;
    padding-block: 1rem;
}

.about-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: start;
}

.about-details dt {
    padding-inline-start: 1rem;
}
.about-details svg {
    width: 2.8rem;
    height: 2.8rem;
    fill: var(--color-primary);
    cursor: pointer;
}
.about-details svg:hover {
    fill: var(--color-secondary);
}
/* Skills section style */
.skills {
    text-align: right;
}
.skills-logos {
    margin: auto;
    max-width: 75%;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    padding-block: var(--section-space);
}
.skills-logos > figure {
    position: relative;
    cursor: pointer;
    flex: 1 1 8rem;
    max-width: 6rem;
    padding-block: 1rem;
    padding-inline: 1rem;
    text-align: center;
    transition: transform 0.2s ease;
    z-index: 2;
}
.skills-logos figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    font-size: 0.8rem;
    font-family: inherit;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1;
}

.skills-logos > figure:hover {
    /* box-shadow: var(--shadow-bg); */
    transform: scale(1.3);
}
.skills-logos > figure:hover figcaption {
    transform: translateY(50%);
    opacity: 1;
}
/* Project section style */
.projects {
    text-align: left;
}
.project-container {
    max-width: 90%;
    margin: auto;
    padding-block: var(--section-space);
}
.project-container > * {
    padding-block-end: 2.4rem;
}
.project-sub {
    text-align: center;
}
.project-container .btn-link {
    display: block;
    width: max-content;
    margin: auto;
}
.card-container {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* flex-wrap: nowrap; */
    width: 20rem;
    min-height: 16rem;
    text-align: left;
    border-radius: var(--radius-m);
    border: 0.1rem solid var(--color-secondary);
    padding-inline: 1.6rem;
    padding-block: 1.6rem;
    /* font-family: 'Josefin Sans', sans-serif; */
    /* font-family: 'Ubuntu', sans-serif; */
    /* font-family: inherit; */
    transition: transform 0.2s ease-out;
}

.project-card:hover {
    box-shadow: var(--shadow-bg);
    transform: scale(1.1);
}

.project-card header h5 {
    color: var(--color-tertiary);
    overflow: clip;
    text-wrap: nowrap;
    text-overflow: ellipsis;
}

.project-card p {
    color: var(--color-text);
}

.project-card footer {
    display: flex;
    justify-content: center;
    gap: 1rem;
    /* flex-wrap: wrap; */
}

.project-card .btn {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    font-size: var(--step--2);
    align-items: center;
    border-radius: var(--radius-sm);
    padding-block: 0.5rem;
    border: 0.1rem solid var(--color-primary);
    transition: background 0.2s ease;
    /* font-family: 'Ubuntu', sans-serif; */
    /* font-family: acre-body, sans-serif; */
    /* line-height: 1; */
}

.project-card .btn:hover {
    background-color: var(--color-primary);
    color: var(--color-bg);
}
.project-card .btn .icon {
    display: inline-flex;
    align-items: center;
    margin-right: 0.8rem;
}
.project-card .btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}
.project-card .btn .text {
    display: inline-flex;
    align-items: center;
    /* height: 16px; */
}

/* Contact section style */
.contact {
    text-align: right;
}
.contact-container {
    /* width: 90%; */
    margin: auto;
    padding-block: var(--section-space);
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
}

.contact-container h5 {
    color: var(--color-tertiary);
}
/* Contact info style */
.contact-info {
    padding: 2rem;
    width: clamp(20rem, 40%, 50rem);
    border-radius: var(--radius-m);
    border: 0.1rem solid var(--color-secondary);
    transition: all 0.1s ease;
}
.contact-container::after {
    content: '';
    width: 0.1rem;
    height: 80%;
    background-color: var(--color-primary);
    position: absolute;
    top: 14%;
    left: 50%;
}
.contact-info:hover {
    box-shadow: var(--shadow-bg);
}

.contact-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-primary);
}

/* .contact-name {
    font-size: 1.5rem;
    margin: 0;
} */

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

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    /* align-items: center; */
    /* transform: scale(1);
    transform-origin: center;
    transition: all 0.2s ease-in; */
}
/* .contact-item:hover {
    transform: scale(1.1);
} */

.contact-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--color-primary);
    margin-top: 0.125rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    margin: 0;
}

.contact-label {
    color: var(--color-tertiary);
}

.contact-value {
    margin: 0;
}

.contact-value a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-value a:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

address {
    font-style: normal;
}
/* Contact from styling */
.contact-form {
    padding: 2rem;
    border-radius: var(--radius-m);
    border: 0.1rem solid var(--color-secondary);
    /* width: clamp(25rem 40%, 50rem); */
    width: 40%;
    transition: all 0.1s ease;
}
.contact-form:hover {
    box-shadow: var(--shadow-bg);
}

.name-fields {
    display: flex;
    gap: 1rem;
    margin-block-end: 1.5rem;
}

.name-fields .input-label {
    flex: 1;
    margin-block-end: 0;
}

.input-label {
    display: block;
    margin-bottom: 1.5rem;
}

.label-text {
    display: block;
    margin-block-end: 0.5rem;
    color: var(--color-text);
}

.form-input,
.form-textarea {
    width: 100%;
    padding-block: 0.8rem;
    padding-inline: 1rem;
    border-radius: var(--radius-sm);
    font-size: var(--step--2);
    border: 0.1rem solid var(--color-secondary);
    background: transparent;
    color: var(--color-text);
    transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    /* box-shadow: 0 0 0 3px rgba(74, 107, 175, 0.2); */
    /* background-color: white; */
}

.form-textarea {
    resize: vertical;
    min-height: 1rem;
}

.submit-btn {
    display: inline-block;
    width: 100%;
    padding-block: 0.8rem;
    color: var(--color-tertiary);
    border-radius: var(--radius-sm);
    border: 0.1rem solid var(--color-primary);
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.submit-btn:hover {
    background: var(--color-primary);
    color: var(--color-bg);
}

/* Footer section Style */
.footer {
    text-align: center;
    padding-block: var(--section-space);

    p {
        font-size: var(--step--2);
    }
}
.footer::before {
    top: 0;
    display: inline-block;
    content: '';
    width: 100%;
    height: 0.05rem;
    background-color: var(--color-secondary);
}
.footer-section {
    display: flex;
    max-width: 90%;
    margin: 0 auto;
    padding-block: 2.5rem;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    /* font-family: 'Ubuntu', sans-serif; */
    /* font-size: 1.2rem; */
}
.footer a {
    fill: var(--color-secondary);
    transition: all 0.1s ease-in-out;
}
.footer a:hover {
    transform: scale(1.2);
    fill: var(--color-primary);
}
.footer span {
    display: inline;
    color: var(--color-primary);
}
.footer-socials {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
}

/*All Animations here */

/* clock animation and svg css */
.hero-image svg {
    position: absolute;
    top: 0;
    right: 1rem;
    animation: upDown 1s ease-in-out infinite;
}
.loader-circle,
.loader-pointer,
.loader-line {
    fill: none;
    stroke-width: 5px;
    stroke: var(--color-primary);
}

.loader-center {
    fill: var(--color-primary);
}

.loader-pointer {
    -webkit-transform-origin: bottom center;
    -moz-transform-origin: bottom center;
    -ms-transform-origin: bottom center;
    transform-origin: bottom center;
    animation: spin 4s linear infinite;
    -moz-animation: spin 4s linear infinite;
    -webkit-animation: spin 4s linear infinite;
}

.loader-line {
    -webkit-transform-origin: bottom center;
    -moz-transform-origin: bottom center;
    -ms-transform-origin: bottom center;
    transform-origin: bottom center;
    animation: spin 60s linear infinite;
    -moz-animation: spin 60s linear infinite;
    -webkit-animation: spin 60s linear infinite;
}

@-moz-keyframes spin {
    from {
        -moz-transform: rotate(0deg);
        -moz-transform-origin: 50% 50%;
    }
    to {
        -moz-transform: rotate(360deg);
        -moz-transform-origin: 50% 50%;
    }
}
@-webkit-keyframes spin {
    from {
        -webkit-transform: rotate(0deg);
        -webkit-transform-origin: 50% 50%;
    }
    to {
        -webkit-transform: rotate(360deg);
        -webkit-transform-origin: 50% 50%;
    }
}
@keyframes spin {
    from {
        transform: rotate(0deg);
        transform-origin: 50% 50%;
    }
    to {
        transform: rotate(360deg);
        transform-origin: 50% 50%;
    }
}
/* clock animation ends here */

/* Button style here */
.btn-link {
    transition: all 0.1s ease;
}
.btn-link:hover {
    /* font-size: 1.8rem; */
    letter-spacing: 0.25rem;
}
/* Glassy button style */
.glassy-button {
    --_padding: 0.8rem 1.6rem;
    --_transition-speed: 200ms;
    --_hover-opacity: 0.4;
    --_pressed-opacity: 0.15;
    --_hover-blurriness: 5px;
    --_pressed-blurriness: 10px;
    --_frostiness: 0.3;
    --_hover-offset: 0.5rem;
    --_pressed-offset: 0.25rem;
    --_motion-factor: 0.1; /* 0 -> 1 */

    outline: 0;
    cursor: pointer;
    font: inherit;
    color: var(--color-bg);
    font-weight: 500;
    padding: 0;
    border: 0;
    border-radius: 0.5rem;
    background-color: transparent;
    position: relative;

    span {
        display: block;
        overflow: hidden;
        padding: var(--_padding);
        border-radius: inherit;
        background-color: hsl(0 0% 100% / 0);
        backdrop-filter: blur(0px);
        transition: background-color var(--_transition-speed),
            backdrop-filter var(--_transition-speed),
            translate var(--_transition-speed);

        &::before {
            content: '';
            position: absolute;
            inset: 0;
            z-index: -1;
            background-image: url("data:image/svg+xml, %3C!-- svg: first layer --%3E%3Csvg viewBox='0 0 171 171' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='3.74' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
            opacity: 0;
            transition: opacity var(--_transition-speed);
        }
    }

    &::after {
        content: '';
        position: absolute;
        z-index: -1;
        inset: 0;
        border-radius: inherit;
        background-color: var(--color-primary);
        transition: scale var(--_transition-speed),
            translate var(--_transition-speed);
        animation: exit forwards var(--_transition-speed);
    }

    &:hover,
    &:focus-visible {
        span {
            outline: 1px solid hsl(0 0% 100% / 0.7);
            background-color: hsl(0 0% 100% / var(--_hover-opacity));
            backdrop-filter: blur(var(--_hover-blurriness));
            translate: 0 calc(var(--_hover-offset) * -1);

            &::before {
                opacity: var(--_frostiness);
            }
        }
        &::after {
            scale: 0.95;
            translate: 0 0.125rem;
            animation: enter forwards var(--_transition-speed);
        }
    }

    &:active {
        span {
            backdrop-filter: blur(var(--_pressed-blurriness));
            background-color: hsl(0 0% 100% / var(--_pressed-opacity));
            translate: 0 calc(var(--_pressed-offset) * -1);
        }
        &::after {
            scale: 0.875;
            translate: 0 0.25rem;
        }
    }
}

@keyframes enter {
    from {
        transform: translate(0, 0);
    }
    to {
        transform: translate(
            calc(var(--_x-motion) * var(--_motion-factor) * -1),
            calc(var(--_y-motion) * var(--_motion-factor) * -1)
        );
    }
}

@keyframes exit {
    from {
        transform: translate(
            calc(var(--_x-motion) * var(--_motion-factor) * -1),
            calc(var(--_y-motion) * var(--_motion-factor) * -1)
        );
    }
    to {
        transform: translate(0, 0);
    }
}

@layer not-demo-related {
    .meta {
        font-size: 0.625rem;
        text-align: center;
        position: fixed;
        inset: auto 2rem 2rem;
    }
}

/* Sliding animation */
/* @keyframes fadeInLeft {
    0% {
        scale: 0.8;
        opacity: 0;
        transform: translateX(-10rem);
    }
    80% {
        transform: translateX(1rem);
    }
    to {
        scale: 1;
        opacity: 1;
        transform: translateX(0);
    }
} */
/* .hero-title,
.hero-subtitle,
.glassy-button,
.btn-link {
    animation: fadeInLeft 1s ease-out;
}
.hero-title {
    animation-delay: 200ms;
} */
/* .hero-subtitle {
    transition-delay: 300ms;
}
.glassy-button {
    transition-delay: 400ms;
}
.btn-link {
    transition-delay: 500ms;
} */

/* @keyframes appear {
    from {
        opacity: 0;
        transform: translateX(0);
    }
    to {
        opacity: 1;
        transform: translateX(20rem);
    }
}

.section-title {
    animation: appear linear;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
} */

.hidden {
    opacity: 0;
    scale: 0.99;
    transform: translateX(-2rem);
    transition: all 1.5s;
}
.hidden-right {
    opacity: 0;
    scale: 0.99;
    transform: translateX(2rem);
    transition: all 1.5s;
}
.hidden-up {
    opacity: 0;
    scale: 0.99;
    transform: translateY(2rem);
    transition: all 1.5s;
}

.show {
    opacity: 1;
    scale: 1;
    transform: translate(0);
}
.project-card:nth-child(2) {
    transition-delay: 200ms;
}
.project-card:nth-child(3) {
    transition-delay: 300ms;
}

/* media queries here */
@media (max-width: 50em) {
    .hero {
        flex-direction: column;
        justify-content: center;
        height: 60vh;
    }
    .about-content-container {
        flex-direction: column;
        justify-content: center;
    }
    .hero aside {
        flex-direction: column;
        .glassy-button {
            width: 100%;
            text-align: center;
        }
    }
    .hero figure {
        display: none;
    }
    .--left,
    .--right {
        /* text-align: center; */
        transform: translateX(0);
    }
    .contact-container {
        flex-direction: column;
        gap: 2rem;
    }
    .about-image {
        width: 60%;
        align-self: center;
    }
    .about-content {
        text-align: center;
        .--details {
            text-align: center;
        }
    }
    .about-details {
        gap: 2rem;
        flex-direction: column;
        text-align: center;
    }
    .skills-logos {
        max-width: 100%;
        gap: 1rem;
    }
    .project-card footer {
        flex-direction: column;
    }
    .contact-info,
    .contact-form {
        width: 85%;
    }
    .contact-container::after {
        display: none;
    }
}

@media (max-width: 60em) {
    .name-fields {
        flex-direction: column;
    }
}
