@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
    height: 100%;
}

/* Base scaling for different resolutions */
@media (min-width: 1920px) {
    html {
        font-size: 75%;
    }
}

@media (min-width: 2560px) {
    html {
        font-size: 87.5%;
    }
}

@media (min-width: 3840px) {
    html {
        font-size: 100%;
    }
}

body {
    width: 100%;
    overflow-x: hidden;
    background-color: black;
    color: white;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    /* Hide scrollbar for IE, Edge and Firefox */
    ::-webkit-scrollbar {
      display: none;
    }
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

body::-webkit-scrollbar {
    display: none;
}

.container {
    scroll-snap-type: y mandatory;
    height: 100vh;
    overflow-y: scroll;
}

section {
    min-height: 100vh;
    scroll-snap-align: start;
    padding: clamp(60px, 8vh, 120px) clamp(20px, 5%, 100px);
    position: relative;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 5%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: 0.3s ease;
}

.logo {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #2e5372;
    font-weight: 800;
    cursor: pointer;
    transition: 0.5s ease;
}

.logo:hover {
    transform: scale(1.1);
}

nav a {
    font-size: clamp(1.6rem, 2vw, 2.2rem);
    color: white;
    margin-left: clamp(2rem, 4vw, 4rem);
    font-weight: 500;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}

nav a:hover,
nav a.active {
    color: #2e5372;
    border-bottom: 3px solid #2e5372;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: white;
    transition: 0.3s;
}

@media(max-width:995px) {
    .hamburger {
        display: block;
    }
    
    nav {
        position: absolute;
        top: 100%;
        right: 0;
        width: 40%;
        border-left: 3px solid #2e5372;
        border-bottom: 3px solid #2e5372;
        border-bottom-left-radius: 2rem;
        padding: 1rem;
        background-color: #161616;
        border-top: 0.1rem solid rgba(0, 0, 0, 0.1);
        display: none;
    }
    
    nav.active {
        display: block;
    }
    
    nav a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }
    
    nav a:hover,
    nav a.active {
        padding: 1rem;
        border-radius: 0.5rem;
        border-bottom: 0.5rem solid #2e5372;
    }
    
    /* Disable scroll snapping on mobile */
    body {
        scroll-snap-type: none;
    }
    
    .container {
        scroll-snap-type: none;
    }
    
    section {
        scroll-snap-align: none;
    }
}

.home {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(4rem, 8vw, 12rem);
    background-color: black;
}

.home .home-content h1 {
    font-size: clamp(4rem, 8vw, 8rem);
    font-weight: 700;
    line-height: 1.3;
}

span {
    color: #2e5372;
}

.home-content h2 {
    font-size: clamp(3rem, 5vw, 5rem);
    margin-bottom: 1rem;
    font-weight: 700;
}

.social-icons {
    margin-left: 50vw;
}

.project_1 h3 {
    font-size: clamp(3.5rem, 6vw, 6rem);
}

.project_1 h4 {
    font-size: clamp(2rem, 3vw, 3rem);
}

.project_1 h5 {
    font-size: clamp(2.5rem, 4vw, 4rem);
}

.project_1 h6 {
    font-size: clamp(1.8rem, 2.5vw, 2.8rem);
}

.project_2 h4 {
    font-size: clamp(2rem, 3vw, 3rem);
}

.project_2 h5 {
    font-size: clamp(1.5rem, 2vw, 2rem);
}
.project_2 h6 {
    font-size: clamp(1.8rem, 2.5vw, 2.8rem);
}
.project_2 b {
    color: #2e5372;
    font-size: clamp(1.8rem, 2.5vw, 2.8rem);
}

.project_3 h4 {
    font-size: clamp(2rem, 3vw, 3rem);
}

.project_3 h5 {
    font-size: clamp(1.5rem, 2vw, 2rem);
}

.project_3 h6 {
    font-size: clamp(1.8rem, 2.5vw, 2.8rem);
}
.project_3 b {
    color: #2e5372;
    font-size: clamp(1.8rem, 2.5vw, 2.8rem);
}
.im_excited {
    margin-left: 43vw;
    font-size: 1.5rem;
}

.mt5 {
    margin-left: 8vw;
    margin-top: 5vh;
    max-width: 80%;
    border-radius: 10px;
}

.proj {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: #2e5372;
    font-size: clamp(2rem, 4vw, 3.5rem) !important;
    cursor: pointer;
    transition: 0.3s ease;
    text-align: center;
    width: 100%;
}

.home-content p {
    font-size: clamp(1.4rem, 1.8vw, 2rem);
    margin: 1.5rem 0;
}

.home-img {
    border-radius: 50%;
}

.home-img img {
    width: min(32vw, 400px);
    border-radius: 50%;
    box-shadow: 0 0 25px solid #2e5372;
    cursor: pointer;
    transition: 0.3s ease;
}

.home-img img:hover {
    transform: scale(1.05);
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: clamp(3.5rem, 5vw, 5rem);
    height: clamp(3.5rem, 5vw, 5rem);
    background-color: transparent;
    border: 0.2rem solid #2e5372;
    font-size: clamp(1.8rem, 2.5vw, 2.5rem);
    border-radius: 50%;
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease;
    color: #2e5372;
}

.social-icons a:hover {
    color: black;
    transform: scale(1.3) translateY(-5px);
    background-color: #2e5372;
    box-shadow: 0 0 25px #2e5372;
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background-color: black;
    border-radius: 4rem;
    font-size: 1.6rem;
    color: #2e5372;
    letter-spacing: 0.3rem;
    font-weight: 600;
    border: 2px solid #2e5372;
    transition: 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    transform: scale3d(1.03);
    background-color: #2e5372;
    color: black;
    box-shadow: 0 0 25px #2e5372;
}

.typing-text {
    font-size: clamp(2.4rem, 4vw, 3.8rem);
    font-weight: 600;
    min-width: min-content;
}

.typing-text #span_1 {
    position: relative;
}

.typing-text #span_2 {
    position: relative;
}

.typing-text #span_1::before {
    content: "software Developer";
    color: #2e5372;
    animation: words_1 10s infinite;
}

.typing-text #span_2::before {
    content: "software Developer";
    color: #2e5372;
    animation: words_2 5s infinite;
}

.typing-text #span_1::after {
    content: "";
    background-color: black;
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid black;
    right: -8;
    animation: cursor 0.6s infinite;
}

.project_1, .project_2, .project_3 {
    display: flex;
    flex-direction: column;
}

.project-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: clamp(2rem, 4vw, 6rem);
    margin-bottom: 3rem;
}

.project-text {
    flex: 1;
}

.project-images {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1.5rem, 2.5vw, 3rem);
    justify-content: flex-end;
}

.project-images img {
    width: 100%;
    max-width: min(400px, 30vw);
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(46, 83, 114, 0.5);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.project-images img:hover {
    transform: scale(1.05);
}

.wave {
    display: none;
}

.mt5 {
    margin: 0;
    max-width: 100%;
}

@media (max-width: 768px) {
    .project-content {
        flex-direction: column;
    }
    
    .project-images {
        justify-content: center;
    }
    
    .project-images img {
        max-width: 100%;
    }
}

@media (min-width: 2000px) {
    .home {
        gap: 10rem;
    }
    
    .project-content {
        gap: 6rem;
    }
    
    .project-images {
        gap: 3rem;
    }
}

@media (min-width: 3000px) {
    section {
        padding: 10rem 10%;
    }
    
    header {
        padding: 1.5rem 10%;
    }
}

@keyframes wave {
  0% { transform: rotate(10deg); }
  100% { transform: rotate(-10deg); }
}

@keyframes cursor {
    to {
        border-left: 3px solid #2e5372;
    }
}

@keyframes words_1 {
    0% {
        content: "Web Developer";
    }
    50%,
    51% {
        content: "Web Designer";
    }
}

@keyframes words_2 {
    0%,
    16% {
        content: "Frontend";
    }
    17%,
    32% {
        content: "Backend";
    }
    33%,
    48% {
        content: "Desktop";
    }
    49%,
    64% {
        content: "Database";
    }
    65%,
    80% {
        content: "Forex Bot";
    }
    81%,
    100% {
        content: "Fullstack";
    }
}

@media (max-width: 1000px) {
    .home {
        gap: 4rem;
    }
}

@media(max-width:995px) {
    .home {
        flex-direction: column;
        margin: 5rem 4rem;
    }
    
    .home-content h1 {
        font-size: 5rem;
    }
    
    .home .home-content h2 {
        font-size: 2.5rem;
    }
    
    .home .home-content h3 {
        font-size: 5rem;
    }
    
    .home .home-content h4 {
        font-size: 2.5rem;
    }
    
    .home-img img {
        width: 70vw;
        margin-top: 4rem;
    }
    
    .social-icons {
        margin-left: 0;
        text-align: center;
    }
    
    .im_excited {
        margin-left: 0;
        text-align: center;
    }
}

/* Image Zoom Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(46, 83, 114, 0.7);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.image-modal.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001;
}

.close-modal:hover {
    color: #2e5372;
}

/* Make all project images clickable */
.project-images img {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-images img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(46, 83, 114, 0.7);
}

/* Remove pointer-events from profile image */
.home-img img {
    cursor: default;
    pointer-events: none;
}
/* Add this to your existing CSS file */

/* Language Switcher Styles */
.language-switcher {
    margin-left: auto;
    margin-right: 2rem;
}
/* Comprehensive link styling for projects */
.project_1 a,
.project_2 a,
.project_3 a {
    color: white !important;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.project_1 a:visited,
.project_2 a:visited,
.project_3 a:visited {
    color: white !important;
}

.project_1 a:hover,
.project_2 a:hover,
.project_3 a:hover {
    color: #2e5372 !important;
    border-bottom: 1px solid #2e5372;
}

/* Specific spacing for project links */
.project_2 h6 a {
    margin-left: 1rem;
}

/* RTL support */
body.rtl .project_2 h6 a {
    margin-left: 0;
    margin-right: 1rem;
}
.lang-btn {
    background: transparent;
    color: white;
    border: 2px solid #2e5372;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-size: clamp(1.4rem, 1.8vw, 1.8rem);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.lang-btn:hover {
    background-color: #2e5372;
    color: black;
    box-shadow: 0 0 15px #2e5372;
    transform: scale(1.05);
}

/* RTL support for Persian */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .home-content {
    text-align: right;
}

body.rtl .project-text {
    text-align: right;
}

body.rtl .social-icons {
    margin-left: 0;
    margin-right: 50vw;
}

body.rtl .im_excited {
    margin-left: 0;
    margin-right: 43vw;
}

body.rtl nav a {
    margin-left: 0;
    margin-right: clamp(2rem, 4vw, 4rem);
}

/* Mobile styles for language switcher */
@media(max-width:995px) {
    .language-switcher {
        margin-right: 1rem;
    }
    
    .lang-btn {
        padding: 0.4rem 1.2rem;
        font-size: 1.4rem;
    }
    
    body.rtl .social-icons {
        margin-right: 0;
        text-align: center;
    }
    
    body.rtl .im_excited {
        margin-right: 0;
        text-align: center;
    }
    
    body.rtl nav {
        right: auto;
        left: 0;
        border-left: none;
        border-right: 3px solid #2e5372;
        border-bottom-right-radius: 2rem;
        border-bottom-left-radius: 0;
    }
}

/* Add RTL support for navigation in mobile */
@media(max-width:995px) {
    body.rtl nav a:hover,
    body.rtl nav a.active {
        padding: 1rem;
        border-radius: 0.5rem;
        border-bottom: 0.5rem solid #2e5372;
    }
}