@font-face {
    font-family: 'arabic';
    src: url("fonts/arabic.ttf");
    src: local("☺"), url("fonts/arabic.ttf") format("truetype");
    font-weight: 900;
    font-style: normal
}

body {
    font-family: "arabic", sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #000;
    color: #fff;
    overflow-x: hidden;
}

header {
    width: 80%;
    border-radius: 100px 100px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 1rem 0;
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    backdrop-filter: blur(0px);
    border: 1px solid rgb(255 111 97 / 43%);
}

.logo {
    position: absolute;
    top: 50%;
    left: 3rem;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}


nav ul {
    font-size: 20px;
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0.5rem 1rem;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #ff6f61;
}

.hero-section {
    height: 100vh;
    background: linear-gradient(135deg, #000, #1a1a1a);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 111, 97, 0.2), rgba(0, 0, 0, 0));
    animation: pulse 5s infinite alternate;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
    animation: fadeIn 2s ease-in-out;
}

.hero-content p {
    font-family: sans-serif;
    font-size: 1.5rem;
    color: #ffffff;
    text-align: left;
    font-weight: 700;
    margin: 1rem 0 1rem 2rem;
}

html[lang="en"] .typewriter {
    color: #ff6f61;
    --caret: currentcolor;
    direction: ltr;
    unicode-bidi: plaintext;
}

html[lang="en"] .typewriter::before {
    content: "";
    animation: enTyping 9s infinite;
}

html[lang="en"] .typewriter::after {
    content: "";
    border-right: 1px solid var(--caret);
    animation: blink 0.5s linear infinite;
}

html[lang="en"] .typewriter.thick::after {
    border-right: 1ch solid var(--caret);
}

@keyframes enTyping {
    0%, 33% { content: ""; }
    1%, 32% { content: "D"; }
    2%, 31% { content: "De"; }
    3%, 30% { content: "Dev"; }
    4%, 29% { content: "Deve"; }
    5%, 28% { content: "Devel"; }
    6%, 27% { content: "Develo"; }
    7%, 26% { content: "Develop"; }
    8%, 25% { content: "Develope"; }
    9%, 24% { content: "Developer"; }

    34%, 66% { content: ""; }
    35%, 65% { content: "I"; }
    36%, 64% { content: "In"; }
    37%, 63% { content: "Inn"; }
    38%, 62% { content: "Inno"; }
    39%, 61% { content: "Innov"; }
    40%, 60% { content: "Innova"; }
    41%, 59% { content: "Innovat"; }
    42%, 58% { content: "Innovato"; }
    42%, 58% { content: "Innovator"; }

    67%, 100% { content: ""; }
    68%, 99% { content: "H"; }
    69%, 98% { content: "Hu"; }
    70%, 97% { content: "Hum"; }
    71%, 96% { content: "Huma"; }
    72%, 95% { content: "Human"; }
}


html[lang="ar"] .typewriter {
    color: #ff6f61;
    --caret: currentcolor;
    direction: rtl;
    unicode-bidi: plaintext;
    position: relative;
    padding-left: 1ch;
}

html[lang="ar"] .typewriter::before {
    content: "";
    animation: arTyping 9s infinite;
}

html[lang="ar"] .typewriter::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 0;
    border-left: 1px solid var(--caret);
    animation: blink 0.5s linear infinite;
    height: 1em;
}

html[lang="ar"] .typewriter.thick::after {
    border-left: 1ch solid var(--caret);
}


@keyframes arTyping {
    0%, 33% { content: ""; }
    1%, 32% { content: "م"; }
    2%, 31% { content: "مط"; }
    3%, 30% { content: "مطو"; }
    4%, 29% { content: "مطور"; }

    34%, 66% { content: ""; }
    35%, 65% { content: "م"; }
    36%, 64% { content: "مب"; }
    37%, 63% { content: "مبت"; }
    38%, 62% { content: "مبتك"; }
    39%, 61% { content: "مبتكر"; }

    67%, 100% { content: ""; }
    68%, 99% { content: "إ"; }
    69%, 98% { content: "إن"; }
    70%, 97% { content: "إنس"; }
    71%, 96% { content: "إنسا"; }
    72%, 95% { content: "إنسان"; }
}


@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}


@media (prefers-reduced-motion) {
    .typewriter::after {
        animation: none;
    }

    @keyframes sequencePopupEn {
        0%, 100% { content: "developer"; }
        33% { content: "inovator"; }
        66% { content: "human"; }
    }

    html[lang="en"] .typewriter::before {
        content: "developer";
        animation: sequencePopupEn 12s linear infinite;
    }

    @keyframes sequencePopupAr {
        0%, 100% { content: "مطور"; }
        33% { content: "مبتكر"; }
        66% { content: "إنسان"; }
    }

    html[lang="ar"] .typewriter::before {
        content: "مطور";
        animation: sequencePopupAr 12s linear infinite;
    }
}

  
.hero-img {
    padding-left: 150px;
    width: 500px;
    height: auto;
    border-radius: 50%;
    pointer-events: none;
    animation: upDown 3s ease-in-out infinite;
}

@keyframes upDown {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@fade-in {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-color {
    color: #ff6f61;
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(51, 48, 48, 0.5);
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
    z-index: 1000;
    opacity: 0;
}
  
.popup-content {
    background-color: rgb(43, 40, 40);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 300px;
    max-width: 80%;
    transform: translateY(-30px);
    opacity: 0;
    transition: all 0.4s ease;
}

.popup.show {
    display: flex;
    opacity: 1;
}

.popup.show .popup-content {
    opacity: 1;
    transform: translateY(0);
}

.close-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #ff6f61;
    color: rgb(255, 255, 255);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
  
.close-btn:hover {
    background-color: #555;
}

@media (min-width: 769px) {
    .popup {
        display: none !important;
    }
}
  
@keyframes fadeIn {
    to {
      opacity: 1;
    }
}
  
  
@keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
}
  
  
@keyframes fadeOut {
    from {
      opacity: 1;
    }
    to {
      opacity: 0;
    }
}

.loader-container {
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    z-index: 9999;
    transition: opacity 0.3s ease-out;
}

.fade-out {
    opacity: 0;
    pointer-events: none;
}

.eye-container {
    position: relative;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, #ffffff 20%, #d4d4d4 60%, #aaaaaa 90%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.iris {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #ff6f61 20%, #850b00 60%, black 100%);
    border-radius: 50%;
    position: absolute;
    transition: transform 0.05s linear;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px #ff6f61;
}

.pupil {
    width: 15px;
    height: 15px;
    background: rgb(0, 0, 0);
    border-radius: 50%;
    box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.3);
}


.angry-eyelid {
    position: absolute;
    width: 120%;
    height: 50%;
    background-color: black;
    border-radius: 50%;
    top: -50px;
    left: -10%;
    transform: rotate(15deg);
    opacity: 0;
    transition: top 0.5s ease-in-out, opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.angry-eyelid.right {
    transform: rotate(-15deg);
}

.angry-eyelid.show {
    top: -10px; 
    opacity: 1;
    transform: rotate(25deg); 
}

.angry-eyelid.right.show {
    transform: rotate(-25deg);
}

.iris.angry {
    transform: translate(0, 0) !important; 
}

  
  @keyframes fadeOut {
    to {
      opacity: 0;
      pointer-events: none;
    }
  }
  
.device-notification {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    -ms-grid-row-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    background-color: #000000;
    z-index: 12
  }
  
  .device-notification--logo {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    text-decoration: none;
    color: #fff
  }
  
  .device-notification--logo p {
    margin: 0 0 0 10px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase
  }
  
  .device-notification--message {
    width: 70%;
    margin: 30px 0 0 0;
    font-weight: 700;
    text-align: center
  }
  
  @media (max-width: 767px) and (min-width: 601px) and (max-height: 680px) {
    .device-notification {
      display: -webkit-box;
      display: -webkit-flex;
      display: -ms-flexbox;
      display: flex
    }
  }
  
  @media (max-width: 600px) and (min-width: 480px) and (max-height: 580px) {
    .device-notification {
      display: -webkit-box;
      display: -webkit-flex;
      display: -ms-flexbox;
      display: flex
    }
  }
  
  @media (max-width: 736px) and (min-width: 360px) and (orientation: landscape) {
    .device-notification {
      display: -webkit-box;
      display: -webkit-flex;
      display: -ms-flexbox;
      display: flex
    }
  }

  
  @media(max-width: 359px) {
    .device-notification {
      display: -webkit-box;
      display: -webkit-flex;
      display: -ms-flexbox;
      display: flex
    }
  }

.skills-section {
    padding: 4rem 2rem;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.skills-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.skills-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #ff6f61;
}

.skills-imgs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.skills-img {
    padding: 15px 60px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.skills-img:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.html-img {
    padding: 0px 60px;
    width: 170px;
    height: 170px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.html-img:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.css-img {
    width: 130px;
    height: 130px;
}

.js-img {
    width: 130px;
    height: 130px;
}

.projects-section {
    padding: 4rem 2rem;
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.projects-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.projects-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #ff6f61;
}

.about-section {
    padding: 4rem 2rem;
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.about-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #ff6f61;
}

.about-text {
    margin: 0 auto;
    line-height: 1.6;
    flex-wrap: wrap;
    max-width: 800px;
    padding: 1rem;
    background-color: rgba(255, 111, 97, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(255, 111, 97, 0.2);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 111, 97, 0.2);
}

.contact-section {
    padding: 4rem 2rem;
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.contact-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #ff6f61;
}


h3 {
    font-size: 30px;
}

h4 {
    font-size: 20px;
}

.skills-box {
    display: block;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0 auto;
    max-width: 800px;
    padding: 1rem;
    background-color: rgba(255, 111, 97, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(255, 111, 97, 0.2);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 111, 97, 0.2);
}


.skills-section ul {
    display: none;
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
}

.skills-section ul li {
    display: none;
    background-color: rgba(255, 111, 97, 0.1);
    margin: 0.5rem 0;
    padding: 1rem;
    border-radius: 5px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    flex: 1 1 calc(25% - 2rem);
    max-width: calc(25% - 2rem);
    text-align: center;
}

.skills-section ul li:hover {
    transform: translateX(10px);
    background-color: rgba(255, 111, 97, 0.2);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    flex-wrap: wrap;
    margin: 0 auto;
    max-width: 800px;
    padding: 3rem;
    background-color: rgba(255, 111, 97, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(255, 111, 97, 0.2);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 111, 97, 0.2);
}

.project-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 16 / 9;
}

.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.project-overlay {
    display: grid;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: #ff6f61;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-overlay p {
    font-size: 1.2rem;
}

.project-overlay h3 {
    font-size: 2rem;
}

@media (max-width: 768px) {
    .project-overlay h3 {
        font-size: 1.5rem;
    }
    .project-overlay p {
        font-size: 1rem;
    }
    
}

.project-item:hover img {
    transform: scale(1.1);
}

.project-item:hover .project-overlay {
    opacity: 1;
}

.instagram-btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.instagram-btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 111, 97, 0.3);
}

.instagram-btn i {
    margin-right: 0.5rem;
    font-size: 1.5rem;
}

.instagram-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 111, 97, 0.5);
}

footer {
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
}

.container1 {
    position: relative;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    border-radius: 7px;
    font-family: sans-serif;
    display: block;
  }
  
  .container1 .skill-box {
    width: 100%;
    margin: 25px 0;
  }
  
  .skill-box .title1 {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
  }
  
  .skill-box .skill-bar {
    height: 8px;
    width: 100%;
    border-radius: 6px;
    margin-top: 6px;
    background: rgba(0,0,0,0.1);
  }
  
  .skill-bar .skill-per {
    position: relative;
    display: block;
    height: 100%;
    width: 90%;
    border-radius: 6px;
    background: #ff6f61;
    animation: progress 0.4s ease-in-out forwards;
    opacity: 0;
  }
  
  .skill-per.html {
    width: 90%;
  }
  
  .skill-per.css {
    width: 65%;
  }
  
  .skill-per.javascript {
    width: 35%;
  }
  
  @keyframes progress {
    0% {
      width: 0;
      opacity: 1;
    }
  
    100% {
      opacity: 1;
    }
  }
  
  .skill-per .tooltip1 {
    position: absolute;
    right: -14px;
    top: -28px;
    font-size: 9px;
    font-weight: 500;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    background: #ff6f61;
    z-index: 1;
    font-size: 12px;
  }
  
  .tooltip1::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -2px;
    height: 10px;
    width: 10px;
    z-index: -1;
    background-color: #ff6f61;
    transform: translateX(-50%) rotate(45deg);
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.language-btn {
    background: rgba(255, 111, 97, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 111, 97, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.9rem;
    margin-top: -5px;

    position: absolute;
    right: 3rem;
}

.language-btn:hover {
    background: rgba(255, 111, 97, 0.2);
    transform: scale(1.05);
}

.lang-btn {
    display: flex;
    align-items: center;
}

.lang-icon {
    font-size: 1rem;
}


@media (max-width: 920px) {
    .hero-img {
        padding-left: 70px;
        }
    .html-img {
        padding: 0px 70px;
        width: 115px;
        height: 115px;
    }
    .css-img {
        width: 90px;
        height: 90px;
    }
    .js-img {
        width: 90px;
        height: 90px;
    }
    .skills-img {
        padding: 10px 70px;
    }
}

@media (max-width: 840px) {
    header {
    width: 90%;
    }
    .html-img {
        padding: 0px 70px;
        width: 100px;
        height: 100px;
    }
    .css-img {
        width: 75px;
        height: 75px;
    }
    .js-img {
        width: 75px;
        height: 75px;
    }
    .skills-img {
        padding: 10px 70px;
    }

}

@media (max-width: 800px) {
    .hero-img {
        padding-left: 0px;
    }
    .html-img {
        padding: 0px 70px;
        width: 90px;
        height: 90px;
    }
    .css-img {
        width: 65px;
        height: 65px;
    }
    .js-img {
        width: 65px;
        height: 65px;
    }
    .skills-img {
        padding: 10px 70px;
    }
}

@media (max-width: 768px) {
    .nav-display {
        display: none;
    }
    header {
        padding: 0.7rem 0;
        height: 50px;
    }

    .lang-btn {
        position: absolute;
        top: 50%;
        right: -1rem;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .hero-img {
        display: none;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .section h2 {
        font-size: 2rem;
    }

    .skills-section h2 {
        font-size: 2rem;
    }
    .skills-section ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        flex: 1 1 calc(50% - 2rem);
    }
    .skills-section ul li {
        display: block;
        width: 20px;
    }

    .projects-section h2 {
        font-size: 2rem;
    }
    .about-section {
        padding: 2rem 1rem;
    }

    .about-section h2 {
        font-size: 2rem;
    }

    .about-section h4 {
        font-size: 1.2rem;
    }
    .contact-section h2 {
        font-size: 2rem;
    }

    .instagram-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

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

    .html-img {
     display: none;
    }
    .css-img {
        display: none;
    }
    .js-img {
        display: none;
    }
    .skills-img {
        display: none;
    }
}




@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .section h2 {
        font-size: 1.8rem;
    }

    .skills-section h2 {
        font-size: 1.8rem;
    }

    .projects-section h2 {
        font-size: 1.8rem;
    }

    .about-section h2 {
        font-size: 1.8rem;
    }

    .about-section h4 {
        font-size: 1rem;
    }

    .contact-section h2 {
        font-size: 1.8rem;
    }

    .instagram-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

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

    .skills-section ul li {
        flex: 1 1 100%;
        max-width: 100%;
    }
}
