:root {
    --bg-color: #000814;
    --bg-color-alt: #001d3d;
    --text-color: #ededed;
    --accent-color: #ff6600;
    --transition-fast: 0.25s ease;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: none;
    text-decoration: none;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}


body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    }

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

ul {
    list-style: none;
}

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

/*---- layout helpers---*/
.section--alt-bg {
    background: var(--bg-color-alt);
}

.heading {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 700;
}

.accent {
    background: linear-gradient(var(--text-color), var(--accent-color));
    -webkit-background-clip: text;
    color: transparent;
}

/* Utilities */
.lead {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 4rem;
    font-size: 1.9rem;
    text-align: center;
    line-height: 1.2;
}

/* Grid helpers */
.resume_grid,
.skills_grid,
.projects_grid {
    display: grid;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: space-between;
}

/* Larger grid */
@media (min-width:768px) {
    .resume_grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .skills_grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .projects_grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Topography */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2.4rem;
    border-radius: 0.8rem;
    background: var(--accent-color);
    color: var(--bg-color);
    font-size: 1.6rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn--outline {
    background: transparent;
    color: var(--accent-color);
    border: .2rem solid var(--accent-color);
}


/* Components */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 4%;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    padding: 1rem;
    width: 100%;
    backdrop-filter: blur(10px);
    background: rgba(0, 29, 61, 0.4);
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand img {
    height: 40px;
    border-radius: 4px;
    background: #fff;
}

.brand_text {
    font-size: 2rem;
    font-weight: 700;
    margin-left: 0.5rem;
}

.navbar {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.navbar a {
    font-size: 1.6rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.navbar a:hover,
.navbar a:active,
.navbar a.active {
    color: var(--accent-color);
}

#menu-icon {
    display: none;
    font-size: 2.5rem;
    cursor: pointer;
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

.home {
    display: flex;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 2rem;
}


.home_content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    flex-wrap: wrap;
}

.homeImage {
    flex: 1;
    max-width: 400px;
    display: flex;
    justify-content: center;
}

.homeImage img {
    width: 100%;
    border-radius: 1rem;
    object-fit: cover;
}

.home_text {
    max-width: 600px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 4rem;
}

.home_text h1 {
    font-size: 5.6rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.home_text p {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.home_content .text-animate {
    position: relative;
    width: 30.2rem;
}

.home_content .text-animate h3 {
    font-size: 3rem;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: .5px var(--accent-color);
    background-image: linear-gradient(var(--accent-color), var(--accent-color));
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-position: -30rem 0;
    animation: homeBgText 6s linear infinite;
    animation-delay: 2s;
}

.home_content .text-animate h3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 23%;
    border-right: 2px solid var(--accent-color);
    z-index: -1;
    animation: homeCursorText 6s linear infinite;
    animation-delay: 2s;
}

.btn-box {
    position: relative;
    display: flex;
    justify-content: space-between;

    width: 34.5rem;
}

.btn-box .btn {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 15rem;    
    height: 100%;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: .0.96rem;
    background: var(--accent-color);
    color: var(--bg-color);
    z-index: 1;
    overflow: hidden;
    transition: -5s;
}

.btn-box .btn:hover {
    color: var(--accent-color);
}

.btn-box .btn:nth-child(2) {
    background: transparent;
    color: var(--accent-color);
}

.btn-box .btn:nth-child(2):hover {
    color: var(--bg-color-alt);
}

.btn-box .btn:nth-child(2)::before {
    background: var(--accent-color);
}

.btn-box .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--bg-color);
    z-index: -1;
    transition: .5s;
}

.btn-box .btn:hover::before {
    width: 100%;
}

.social-links {
    position: relative;
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    z-index: 1;
}

.social-links a {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: .2rem solid var(--accent-color);
    border-radius: 50%;
    font-size: 25px;
    color: var(--accent-color);
    z-index: 1;
    overflow: hidden;
    transition: .5s;
}

.social-links a:hover {
    transform: scale(1.2);
    color: var(--bg-color-alt);
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--accent-color);
    z-index: -1;
    transition: .5s;
}

.social-links a:hover::before {
    width: 100%;
}

.about {
    padding: 8rem 1rem;
    color: #fff;
    text-align: center;
}

@media (prefers-color-scheme: dark) {
  .about {
    background-color: #111;
    color: #eee;
  }
}

.about-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    text-align: left;
    flex-wrap: wrap;
}

.about-img {
    flex: 1;
    max-width: 400px;
}

.about-img img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.about-content {
    flex: 1;
    max-width: 600px;
}

.about-content h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.about-content p {
    font-size: 1.9rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.btn-box.btns {
    display: inline-block;
    width: 15rem;
    border-radius: .8rem;
    border: .2rem solid var(--accent-color);
}

.resume {
    padding: 8rem 1rem;
}

.resume .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.resume_grid .resume_column {
    flex: 1 1 45%;
}

.resume_column .skill-list {
    flex: 1 1 35%;
}

.resume_column {
    flex: 1 1 30%;
    min-width: 280px;
}

.resume_column .title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.resume_box .resume_content {
    position: relative;
    padding-left: 2rem;
}

.resume_content .content {
    position: relative;
    padding: 1.5rem;
    border: .2rem solid var(--accent-color);
    border-radius: .6rem;
    margin-bottom: 2rem;
    overflow: hidden;
}

.resume_content .content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--bg-color);
    z-index: -1;
    transition: .5s;
}

.resume_content .content:hover::before {
    width: 100%;
}

.experience-list {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
    line-height: 1.5;
    border: .2rem solid var(--accent-color);
    border-radius: .6rem;
    padding: 1.5rem;
    padding-left: 1.5rem;
}

.experience-list li {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: flex-start;
}

.resume_content .experience-list {
    position: relative;
    border-radius: .6rem;
    margin-bottom: 2rem;
    overflow: hidden;
}

.resume_content .experience-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--bg-color);
    z-index: -1;
    transition: .5s;
}

.resume_content .experience-list:hover::before {
    width: 100%;
}

.technical {
    width: 100%;
    margin-top: 2rem;
}

.technical table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.3rem;
}

.technical th,
.technical td {
    border: 1px solid var(--accent-color);
    padding: 0.8rem;
    text-align: left;
}

.technical th {
    background-color: var(--bg-color-alt);
    color: var(--accent-color);
}

.skill-list {
    list-style-type: none;
    padding-left: 0;
}

.skill-list,
.experience-list {
    align-items: flex-start;
    margin-bottom: 0.8rem;
}

.skill-list li,
.experience-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.8rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.skill-list li:hover,
.experience-list li:hover {
    transform: translateX(8px);
}

.skill-list li i,
.experience-list li i {
    color: var(--text-color);
    margin-right: 0.5rem;
    font-size: 1.2rem;
    line-height: 1.5rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.skill-list li {
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    cursor: pointer;
}

.skill-list li:hover i,
.experience-list li:hover i {
    transform: scale(1.2);
    color: var(--accent-color);
}


@media (prefers-color-scheme: dark) {
  .skills {
    background-color: #111;
    color: #eee;
  }
}

.skills {
    padding-bottom: 6rem 1rem;
    text-align: left;
}

.skills_grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.skills .heading {
    margin-bottom: 3rem;
    text-align: center;
}

.skills_grid .title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    text-align: center;
}

.skills .container {
    max-width: 1200px;
    margin: 0 auto;
}

.skills_grid {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    text-align: left;
}

.skills-text {
    flex: 1 1 40%;
    font-size: 1.6rem;
}

.skills-text .title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.skills-text p {
    line-height: 1.6;
    font-size: 1.5rem;
}

.skills_grid .skills-box {
    position: relative;
    border: .2rem solid var(--accent-color);
    border-radius: .6rem;
    padding: .5rem 1.5rem;
    z-index: 1;
    overflow: hidden;
}

.skills_grid .title {
    font-size: 2.5rem;
    margin: 0 0 1.5rem 2rem;
}

.skills_grid .skills-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--bg-color);
    z-index: -1;
    transition: .5s;
}

.skills_grid .skills-box:hover::before {
    width: 100%;
}

.skills-box {
    flex: 1 1 50rem;
    background: var(--bg-color);
    padding: 2rem;
    border: 2px solid var(--accent-color);
    border-radius: 1rem;
    box-shadow: 0 0 20px rgba(0 0 0 0.5);
    width: 100%;
    transition: all 0.3s ease-in-out;
}

.skills-box ul,
.skills-box .progress {
    flex-grow: 1;
}

/* progress bar */
.progress {
    margin-bottom: 2rem;
}

.skills-box .progress {
    padding: 1rem 0;
}

.skills-box .progress h4 {
    font-size: 1.5rem;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.bar {
    height: 12px;
    background: transparent;
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.skills-box .progress .bar {
    position: relative;
    height: 12px;
    border-radius: 10px;
    border: .1rem solid var(--accent-color);
    overflow: hidden;
}

.skills-box .progress .bar span {
    display: block;
    height: 100%;
    border-radius: 10px;
    background: var(--accent-color);
    width: 0;
    transition: width 1.5s ease-in-out;
}

.skills-box.visible .progress:nth-of-type(1) .bar span { width: 90%;} /* forHtml */
.skills-box.visible .progress:nth-of-type(2) .bar span { width: 80%;} /* forCss */
.skills-box.visible .progress:nth-of-type(3) .bar span { width: 75%;} /* forJavaScript */
.skills-box.visible .progress:nth-of-type(4) .bar span { width: 75%;} /* forReact */
.skills-box.visible .progress:nth-of-type(5) .bar span { width: 90%;} /* forPhotoShop */
.skills-box.visible .progress:nth-of-type(6) .bar span { width: 80%;} /* forAdobeIlustrator */
.skills-box.visible .progress:nth-of-type(7) .bar span { width: 90%;} /* forCorelDraw */

.progress:hover .bar span {
    filter: brightness(75%);
    cursor: pointer;
}

/* project */
.projects {
    padding: 6rem 1rem;
    text-align: center;
}

.projects .container {
    max-width: 1200px;
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.projects .heading {
    margin-bottom: 4rem;
}

.project-card {
    background: var(--bg-color);
    border-radius: 8px;
    border: .2rem solid var(--accent-color);
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease; box-shadow: 0.3s ease;
    overflow: hidden;
}

.project-card:hover {
    transform: translatey(-8px);
}

.project-card img {
    width: 100%;
    height: auto;
    display: block;
}

.project-content {
    padding: 2rem;
    text-align: left;
}

.project-card h3 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.project-card p {
    font-size: 1.6rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-tech {
    font-size: 1.4rem;
    display: block;
    color: gray;
    margin-bottom: 1.5rem;
}

/* contact */
@media (prefers-color-scheme: dark) {
  .contact {
    background-color: #111;
    color: #eee;
  }
}

.contact {
    padding: 6rem 1rem;
}

.contact .container {
    max-width: 900px;
    margin: 0 auto;
}

.contact .heading {
    margin-bottom: 3rem;
}

.contact form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact form .input-box {
    position: relative;
    display: flex;
    gap: 2%;
    flex-wrap: wrap;
}

.contact form ,.input-box .input-field {
    position: relative;
    flex: 1 1 48%;
}

.contact form .input-box .input-field input,
.contact form .textarea-field textarea {
    width: 100%;
    height: 100%;
    padding: 1.4rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: transparent;
    border-radius: .6rem;
    outline: none;
    resize: none;
    border: .2rem solid var(--accent-color);
}

.contact form .input-field .focus,
.textarea-field .focus {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--bg-color-alt);
    border-radius: .6rem;
    z-index: -1;
    transition: width 0.4s ease;
}

.contact form .input-box .input-field input:focus~.focus,
.contact form .input-box .input-field input:valid~.focus,
.contact form .textarea-field textarea:focus~.focus,
.contact form .textarea-field textarea:valid~.focus {
    width: 100%;
} 

.contact form .textarea-field {
    position: relative;
    display: flex;
    flex-direction: column;
}

.contact form .btn-box .btn {
    cursor: pointer;
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    font-size: 1.5rem;
}

.footer p {
    margin: 0;
}

.footer_to-top a {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-color);
    border: .2rem solid var(--accent-color);
    border-radius: .6rem;
    z-index: 1;
    overflow: hidden;
    transition: background 0.3s ease;
}

.footer_to-top a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--bg-color-alt);
    z-index: -1;
    transition: .5s;
}

.footer_to-top a:hover::before {
    width: 100%;
}

.footer_to-top a i {
    font-size: 2.4rem;
    color: var(--accent-color);
}

.footer_to-top a:hover i {
    color: var(--accent-color);
}


/* Mobile nav */
@media (max-width:1200px) {
    html {
        font-size: 55%;
    }
    
}

@media (max-width:992px) {
    html {
        padding: 5rem 2% 2rem;
    }

    section {
        padding: 5rem 2% 2rem;
    }
    
    .home {
        padding: 0 4%;
    }

    .home-content {
        justify-content: space-between;
        align-items: center;
    }

    .home-text {
        align-items: flex-start;
        text-align: left;
    }
    
    .about-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .about-content h3 {
        font-size: 3rem;
    }

    .about-content p {
        font-size: 2rem;
    }

    .resume_grid {
        flex-direction: column;
    }

    .resume_column {
        flex: 1 1 100%;
    }

    .resume .lead {
        font-size: 1.5rem;
    }

    .resume_column .title {
        text-align: center;
    }

    .footer {
        padding: 2rem 4%;
    }
}


@media (max-width:768px) {
    #menu-icon {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: -100%;
        flex-direction: column;
        width: 100%;
        background: var(--bg-color);
        padding: 2rem 0;
    }

    .navbar.active {
        left: 0;
    }

    .navbar a {
        margin: 1.5rem 0;
        font-size: 2rem;
    }

    .home {
        padding-top: 2rem;
        margin-top: 5rem;
    }

    .home_content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .homeImage,
    .home_text {
        width: 100%;
        max-width: 500px;
    }


    .home_text h1 {
        font-size: 5rem;
    }

    .text-animate h3 {
        font-size: 2rem;
    }

    .home_text p {
     font-size: 2rem;
    }

    .home_text {
        align-items: center;
        padding-top: 2rem;
    }


    .social-links {
        justify-content: center;
    }

    .about-wrapper {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .about-content {
        text-align: left;
        padding-left: 2rem;
    }

    .about-img,
    .about-content {
        flex: 1;
    }

  
    .skills_grid .title {
        font-size: 2rem;
    }

    .skills_grid {
        flex-direction: column;
        align-items: center;
    }

    .skills-box {
        padding: 1.5rem;
    }

    .skills-text,
    .skills-box {
        flex: 1 1 100%;
        text-align: center;
    }

    .skills-text {
        font-size: 1.4rem;
    }

    .skills-text, .skills-box {
        width: 100%;
    }

    .progress h4 {
        justify-content: center;
        gap: 1rem;
        font-size: 1rem;
    }

    .input-box {
        flex-direction: column;
    }

    .input-field {
        flex: 1 1 100%;
    }
}


@media (max-width:520px) {
    html {
        font-size: 50%;
    }
}

@media (max-width: 462px) {
    .home_content h1 {
        font-size: 5.2rem;
    }

    .home_text p {
        font-size: 2rem;
    }
    
    .resume {
        padding: 10rem 4% 5rem 5%;
    }


    .technical {
        padding-left: 4rem;
        width: 40rem;
    }

    .contact form .input-box .input-field {
        width: 100%;
    }

    footer {
        flex-direction: column-reverse;
    }
}

@media (max-width: 371px) {
    .home {
        justify-content: center;
    }

    .home_content {
        display: flex;
        align-items: center;
        flex-direction: column;
        text-align: center;
    }

    .home_content h1 {
        font-size: 5rem;
    }

    .technical {
        padding-left: 2rem;
        width: 4rem;
    }

    .projects_grid {
        width: 40rem;
    }

    .project-card {
        width: 35rem;
    }

    .btn-box {
        width: 31rem;
    }
}


/* Keyframes */
@keyframes slideln {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes homeBgText {
    0%, 10%, 100% {
        background-position: -30rem 0;
    }

    65%, 85% {
        background-position: 0 0;
    }
}

@keyframes homeCursorText {
    0%, 10%, 100% {
        width: 0;
    }

    65%, 75%, 85% {
        width: 100%;
        opacity: 1;
    }

    75%, 81% {
        opacity: 0;
    }
}