/* Original concept by Leonam Silva de Souza (https://codepen.io/leonam-silva-de-souza/pen/zxOBmoe) */
/* Copyright (c) 2025 MD ANAYET HOSSEN - All rights reserved */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900&display=swap');

:root {
    --header-height: 3rem;
    --font-medium: 500;

    --first-color: #5361ff;
    --white-color: #fafaff;
    --dark-color: #2a3b47;
    --text-color: #697477;

    --body-font: 'Montserrat', sans-serif;
    --big-font-size: 6.25rem;
    --h2-font-size: 1.25rem;
    --normal-font-size: .938rem;
    --small-font-size: .813rem;

    --mb1: .5rem;
    --mb2: 1rem;
    --mb3: 1.5rem;
    --mb4: 2rem;

    --z-fixed: 100;
}

@media screen and (min-width: 768px) {
    :root {
        --big-font-size: 10.5rem;
        --h2-font-size: 2rem;
        --normal-font-size: 1rem;
        --small-font-size: .875rem;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html {
    scroll-behavior: smooth;
}

body {
    margin: var(--header-height) 0 0 0;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { text-decoration: none; color: var(--text-color); }
img { max-width: 100%; height: auto; display: block; object-fit: cover; }

.section { padding: 3rem 0; }

.section-title {
    position: relative;
    font-size: var(--h2-font-size);
    color: var(--dark-color);
    margin: var(--mb4) 0;
    text-align: center;
}

.section-title::after {
    position: absolute;
    content: '';
    width: 32px;
    height: 0.18rem;
    left: 0;
    right: 0;
    margin: auto;
    top: 2rem;
    background-color: var(--first-color);
}

/* Fix grid definition */
.bd-grid {
    max-width: 1024px;
    display: grid;
    grid-template-columns: 100%;
    grid-column-gap: 2rem; /* Fixed grid-column-gpw */
    width: calc(100% - 2rem);
    margin: 0 auto; /* Fixed mse-alerts */
}

/* HEADER */
.l-header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: var(--first-color);
}

.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-item { margin-bottom: var(--mb4); }
.nav-link { position: relative; color: var(--dark-color); }
.nav-link:hover { color: var(--first-color); }
.nav-logo { color: var(--white-color); }
.nav-toggle { color: var(--white-color); font-size: 1.5rem; cursor: pointer; padding: 1rem; }

/* Correct the content property in CSS */
.nav-link.active::after {
    content: '';
    width: 100%;
    height: 2px;
    background-color: var(--white-color); /* Add color */
    bottom: -5px;
}
@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: var(--header-height); /* Prevents overlapping with header */
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #5361ff;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transform: translateX(-100%);
        transition: transform 0.5s ease-in-out;
        z-index: 999;
    }

    .nav-menu.show {
        transform: translateX(0);
    }

    .nav-item {
        margin-bottom: var(--mb2);
    }
    
    .nav-link.nav-link:hover {
        color: #4e4d47;
    }

    .nav-link {
        color: #fafaff;
        font-size: 1.2rem;
        padding: 1rem;
        display: block;
    }

    .nav-toggle {
        z-index: 1000;
    }
}


/* HOME */
.home {
    position: relative;
    background-color: var(--first-color);
    overflow: hidden;
}

.home-container {
    height: calc(100vh - var(--header-height));
    row-gap: 5rem;
}

.home-title {
    align-self: flex-end;
    font-size: var(--big-font-size);
    color: var(--white-color);
    line-height: 0.8;
}

.home-title span { text-shadow: 0 20px 25px rgba(0, 0, 0, .5); }

.home-scroll {
    align-self: flex-end;
    padding-bottom: var(--mb4);
}

.home-scroll-link {
    writing-mode: vertical-lr;
    transform: rotate(-180deg);
    color: var(--white-color);
}

.home-img {
    position: absolute;
    right: 0;
    bottom: -20px;
    height: 610px;
    width: 500px;
    will-change: transform;
}

/* ABOUT */
.footer-social {
    background-color: #2A3A47; /* Instagram's brand color */
    color: rgba(0, 0, 0, 0); /* Icon color */
    font-size: 24px; /* Adjust as needed */
    padding: 10px; /* Adds spacing around the icon */
    border-radius: 50%; /* Makes it circular */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; /* Ensure it is circular */
    height: 40px;
    transition: background-color 0.3s ease-in-out;
}

.footer-social:hover {
    background-color: #2971db; /* Darker Instagram shade on hover */
}


.about-container {
    justify-items: center;
    row-gap: 2rem;
    text-align: center;
}

.about-img {
    display: flex;
    justify-content: center;
    padding-top: none;
    width: 120px;
    height: 120px;
    background-color: var(--first-color);
    border-radius: 50%;
    overflow: hidden;
}

.about-img img { width: 100px; }

.about-subtitle {
    font-size: var(--h2-font-size);
    color: var(--first-color);
    margin-bottom: var(--mb1);
}

.about-text { margin-bottom: var(--mb4); }
.about-profession { display: block; margin-bottom: var(--mb4); }
.about-social-icon { font-size: 1.4rem; margin: 0 var(--mb1); }
.about-social-icon:hover { color: var(--first-color); }

/* SKILLS */
.skills-container { row-gap: 2rem; }
.skills-subtitle { color: var(--first-color); margin-bottom: var(--mb3); }
.section-title {
    margin-top: -50px; /* Add margin at the top */
}

.skills-name {
    display: inline-block;
    font-size: 15px;
    margin-right: 6px;
    margin-bottom: 10px;
    border-radius: 200rem;
    transition: .5s;
    padding: 0.6rem 0.5rem;
    background-color: var(--white-color);
    border: 1px solid var(--first-color);
}

.skills-name:hover {
    background-color: var(--first-color);
    color: var(--white-color);
}

.skills-img img { border-radius: .5rem; }

/* PORTFOLIO */
.portfolio-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  justify-items: center;
}

.portfolio-img {
  width: 300px;
  height: 200px;
  position: relative;
  overflow: hidden;
  background-color: #f4f4f4;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* Maintain aspect ratio */
  border-radius: 0.5rem;
  transition: transform 0.3s ease-in-out;
}

/* Optional: hover zoom effect */
.portfolio-img:hover img {
  transform: scale(1.05);
}

.portfolio-link {
  position: absolute;
  bottom: -100%;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(58, 52, 52, 0.479);
  border-radius: 0.5rem;
  backdrop-filter: blur(10px);
  transition: 0.3s ease-in-out;
}

.portfolio-img:hover .portfolio-link {
  bottom: 0;
}

.portfolio-link-name {
  color: var(--dark-color);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
}

.video-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 100px;
  padding: 0;
}

.video-section {
  margin: 0;
  padding: 0;
  text-align: center;
}

.video-section h2 {
  font-size: 16px;
  color: var(--primary-color);
  margin: 5px 0;
}

.video-container {
  position: relative;
  display: inline-block;
}

.video-container video {
  width: 300px;
  height: 480px;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}

.mute-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: #ffffffdd;
  border: none;
  border-radius: 4px;
  padding: 5px 7px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.mute-btn:hover {
  background: #ffffff;
}

/* Fix line 387 - contact-container */
.contact-container {
    display: grid;
    grid-template-columns: 1fr; /* Changed from 1ft */
    gap: 2rem;
    align-items: center; /* Fixed 3dign-freen */
    justify-content: center; /* Fixed img1:4y-content */
    padding: 2rem 0; /* Fixed padding value */
}

.contact-form label {
    display: block; /* Ensures labels are on their own line */
    font-weight: bold;
    margin-bottom: 0.3rem;
}


.contact-info {
    text-align: center;
    margin-bottom: 2rem;
}

/* Update the CSS to target .contact-form.visible */
.contact-form {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.contact-form.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-inputs {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-input {
    width: 100%;
    padding: 0.8rem;
    border: 1.5px solid var(--dark-color);
    border-radius: 0.5rem;
    font-size: var(--normal-font-size);
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-input:focus {
    border-color: var(--first-color);
    box-shadow: 0 0 8px rgba(83, 97, 255, 0.3);
}

.contact-button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--first-color);
    color: var(--white-color);
    border: none;
    border-radius: 0.5rem;
    font-size: var(--normal-font-size);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.contact-button:hover {
    background-color: #434fd1; /* Darker shade of primary color */
    transform: scale(1.02);
}

.contact-button.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.contact-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border-radius: 50%;
    border: 2px solid var(--white-color);
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* FOOTER */
.footer { background-color: var(--dark-color); }
.footer-container { row-gap: 2rem; }
.footer-title { font-size: var(--normal-font-size); color: var(--white-color); margin-bottom: var(--mb2); }
.footer-link { padding: 0.25rem 0; color: var(--white-color); }
.footer-link:hover { color: var(--first-color); }

/* Add this new rule */
.copyright {
    color: #000;
}

.footer-social {
    font-size: 1.4rem;
    margin-right: var(--mb1);
    color: var(--white-color);
}

/* MEDIA QUERIES */
@media screen and (min-width: 768px) {
    body { margin: 0; }
    .section { padding-top: 4rem; }
    .section-title { margin-bottom: 3rem; }
    .section-title::after { width: 64px; top: 3rem; }

    .nav { height: calc(var(--header-height) + 1rem); }
    .nav-list { display: flex; }
    .nav-item { margin-left: var(--mb4); margin-bottom: 0; }
    .nav-toggle { display: none; }
    .nav-link { color: var(--white-color); }
    .nav-link:hover { color: var(--white-color); }
    .active::after { background-color: var(--white-color); }

    .home-container { height: 100vh; grid-template-rows: 1.7fr 1fr; row-gap: 0; }
    .home-img { width: 524px; right: 10%; }

    .about-container { grid-template-columns: repeat(2, 1fr); align-items: center; text-align: initial; padding: 4rem 0; }
    .about-img { width: 200px; height: 200px; }
    .about-img img { width: 165px; }

    .skills-container { grid-template-columns: repeat(2, 1fr); align-items: center; }

    .portfolio-container { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); column-gap: 2rem; }

    .contact-container { grid-template-columns: repeat(2, 1fr); justify-items: center; }
    .contact-form { width: 380px; }

    .footer-container { grid-template-columns: repeat(3, 1fr); justify-items: center; }
}

@media screen and (min-width: 1024px) {
    .bd-grid { margin-left: auto; margin-right: auto; }
}
