/* style.css */
:root {
    /* Dark Mode (Default) */
    --bg-color: #0a1929;
    --text-color: #e6f1ff;
    --accent-color: #64ffda;
    --card-bg: #112240;
    --header-bg: #0a1929;
    --border-color: #233554;
    --input-bg: #112240;
    --shadow-color: rgba(2, 12, 27, 0.7);
    --social-icon-bg: #1d3a5c;
}

[data-theme="light"] {
    /* Light Mode */
    --bg-color: #f5f7fa;
    --text-color: #333333;
    --accent-color: #2d7d9a;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --border-color: #e1e8f0;
    --input-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --social-icon-bg: #f0f5ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

body {
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
header {
    background-color: var(--header-bg);
    padding: 20px 0px;
    box-shadow: 0 15px 12px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 10%;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
    cursor: pointer;
}

.theme-toggle {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    width: 75px;
    height: 30px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
}

.theme-toggle i {
    font-size: 14px;
    z-index: 1;
}

.theme-toggle i.fa-moon {
    color: var(--accent-color);
}

.theme-toggle i.fa-sun {
    color: var(--accent-color);
}

.theme-toggle::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background-color: var(--accent-color);
    border-radius: 50%;
    left: 3px;
    transition: transform 0.3s;
}

[data-theme="light"] .theme-toggle::before {
    transform: translateX(44px);
}

/* From Uiverse.io by JustCode14 */ 
/* Theme Switch */
/* The switch - the box around the slider */
.switch {
    font-size: 17px;
    position: relative;
    display: inline-block;
    width: 4em;
    height: 2.2em;
    border-radius: 30px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  }
  
  /* Hide default HTML checkbox */
  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  /* The slider */
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #2a2a2a;
    transition: 0.4s;
    border-radius: 30px;
    overflow: hidden;
  }
  
  .slider:before {
    position: absolute;
    content: "";
    height: 1.2em;
    width: 1.2em;
    border-radius: 20px;
    left: 0.5em;
    bottom: 0.5em;
    transition: 0.4s;
    transition-timing-function: cubic-bezier(0.81, -0.04, 0.38, 1.5);
    box-shadow: inset 8px -4px 0px 0px #fff;
  }
  
  .switch input:checked + .slider {
    background-color: #00a6ff;
  }
  
  .switch input:checked + .slider:before {
    transform: translateX(1.8em);
    box-shadow: inset 15px -4px 0px 15px #ffcf48;
  }
  
  .star {
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    width: 5px;
    transition: all 0.4s;
    height: 5px;
  }
  
  .star_1 {
    left: 2.5em;
    top: 0.5em;
  }
  
  .star_2 {
    left: 2.2em;
    top: 1.2em;
  }
  
  .star_3 {
    left: 3em;
    top: 0.9em;
  }
  
  .switch input:checked ~ .slider .star {
    opacity: 0;
  }
  
  .cloud {
    width: 3.5em;
    position: absolute;
    bottom: -1.4em;
    left: -1.1em;
    opacity: 0;
    transition: all 0.4s;
  }
  
  .switch input:checked ~ .slider .cloud {
    opacity: 1;
  }
  

/* Hero Section */
.hero {
    padding: 80px 0;
}

.hero-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 50px;
}

.hero-text {
    flex: 1;
    min-width: 300px;
}

.hero-text h1 {
    font-size: 48px;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.hero-text h2 {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 500;
    color: var(--text-color);
    opacity: 0.9;
}

.hero-text p {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 400px;
    flex-direction: column;
    align-items: flex-end;
    padding-top: 40px;
}

.circle-placeholder {
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), #2d7d9a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    color: white;
    box-shadow: 0 20px 40px var(--shadow-color);
    overflow: hidden;
}

.img-circle-placeholder{
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;

}
/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: #0a1929;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(100, 255, 218, 0.3);
}

.download-btn {
    font-size: 18px;
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 36px;
    text-align: center;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.section-subtitle {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    font-size: 18px;
    opacity: 0.9;
}

/* Projects Grid */
.projects-grid, .web-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card, .web-project-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: transform 0.8s;
    display: flex;
    /* grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); */
    /* gap: 30px; */
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    
}

.project-card:hover, .web-project-card:hover {
    transform: translateY(-15px);
    cursor: pointer;
    background-color: var(--social-icon-bg);
}

.project-icon, .web-project-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--social-icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.project-card h3, .web-project-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.project-card p, .web-project-card p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.project-link, .web-project-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.project-link:hover, .web-project-link:hover {
    text-decoration: none;
}

/* Circular Image Section */
.circular-image-section {
    padding: 20px 0;
    width: 100%;
}

.circular-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.circular-image {
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 20px 40px var(--shadow-color);
}

.circular-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
}

/*slider*/
swiper-container {
    width: 100%;
    padding-top: 50px;
    padding-bottom: 50px;
  }

  swiper-slide {
    background-position: center;
    background-size: cover;
    width: 300px;
    height: 300px;
  }

  swiper-slide img {
    display: block;
    width: 100%;
  }



/* Social Grid */
.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px; 
}

.social-item {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 10px 20px var(--shadow-color);
    transition: transform 0.5s;
}

.social-item:hover {
    transform: translateY(-15px);
    background-color: var(--social-icon-bg);
    cursor: pointer;
}

.social-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--social-icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 20px;
    color: var(--accent-color);
}

.social-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.social-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.social-link:hover {
    color: var(--text-color);
}

/* Contact Section */
.contact {
    background-color: var(--card-bg);
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--input-bg);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 15px 40px var(--shadow-color);
}

.contact-form h3 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.contact-form > p {
    margin-bottom: 30px;
    opacity: 0.9;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    font-size: 16px;
    font-family: inherit;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-note {
    font-size: 14px;
    opacity: 0.7;
    margin-top: 8px;
}

.ai-btn {
    background-color: #6c63ff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s;
}

.ai-btn:hover {
    background-color: #554fd8;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    margin-top: 20px;
}
.submit-btn:hover{
    cursor: pointer;
}

/* Footer */
footer {
    background-color: var(--header-bg);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

footer p {
    opacity: 0.8;
}

/* Responsive Styles
@media (max-width: 768px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 36px;
    }
    
    .hero-text h2 {
        font-size: 20px;
    }
    
    .section-title {
        font-size: 30px;
    }
    
    .circular-image {
        width: 350px;
        height: 350px;
    }
    
    .contact-form {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 26px;
    }
    
    .circular-image {
        width: 280px;
        height: 280px;
    }
    
    .projects-grid, .web-projects-grid, .social-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 20px;
    }
}
*/

/*loader*/

.loader{
 width: 100%;
 height: 100%;
 position: fixed;
 inset: 0;
 background-color: #0a1929;
 display: flex;
 align-items: center;
 justify-content: center;
 z-index: 9999999;

}
.ai-matrix-loader {
    width: 200px;
    height: 160px;
    margin: 30px auto;
    position: relative;
    perspective: 800px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }
  
  .digit {
    color: #00ff88;
    font-family: monospace;
    font-size: 18px;
    text-align: center;
    text-shadow: 0 0 5px #00ff88;
    animation:
      matrix-fall 2s infinite,
      matrix-flicker 0.5s infinite;
    opacity: 0;
  }
  
  .digit:nth-child(1) {
    animation-delay: 0.1s;
  }
  .digit:nth-child(2) {
    animation-delay: 0.3s;
  }
  .digit:nth-child(3) {
    animation-delay: 0.5s;
  }
  .digit:nth-child(4) {
    animation-delay: 0.7s;
  }
  .digit:nth-child(5) {
    animation-delay: 0.9s;
  }
  .digit:nth-child(6) {
    animation-delay: 1.1s;
  }
  .digit:nth-child(7) {
    animation-delay: 1.3s;
  }
  .digit:nth-child(8) {
    animation-delay: 1.5s;
  }
  
  .glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
      circle,
      rgba(0, 255, 136, 0.1) 0%,
      transparent 70%
    );
    animation: matrix-pulse 2s infinite;
  }
  
  @keyframes matrix-fall {
    0% {
      transform: translateY(-50px) rotateX(90deg);
      opacity: 0;
    }
    20%,
    80% {
      transform: translateY(0) rotateX(0deg);
      opacity: 0.8;
    }
    100% {
      transform: translateY(50px) rotateX(-90deg);
      opacity: 0;
    }
  }
  
  @keyframes matrix-flicker {
    0%,
    19%,
    21%,
    100% {
      opacity: 0.8;
    }
    20% {
      opacity: 0.2;
    }
  }
  
  @keyframes matrix-pulse {
    0%,
    100% {
      opacity: 0.3;
    }
    50% {
      opacity: 0.7;
    }
  }
  
/* ===================== */
/*  شاشة أقل من 768px     */
/* ===================== */
@media (max-width: 768px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 20px;
    }
    
    .hero-text h1 {
        font-size: 36px;
        line-height: 1.2;
    }
    
    .hero-text h2 {
        font-size: 20px;
        line-height: 1.3;
    }

    .section-title {
        font-size: 30px;
    }
    
    /* تحسين الصورة وخليها responsive */
    .circular-image {
        width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
        border-radius: 50%;
    }

    .projects-grid,
    .web-projects-grid,
    .social-grid {
        gap: 20px;
    }

    .contact-form {
        padding: 25px;
    }
}


/* ===================== */
/*  شاشة أقل من 480px     */
/* ===================== */
@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 28px;
    }
    .container{
        width: 100%;
        padding: 0 10px;
        
    }
    
    .section-title {
        font-size: 26px;
    }
    
    /* الصورة أصغر على الشاشات الصغيرة جدًا */
    .circular-image {
        width: 95%;
        height: auto;
    }

    /* الجريد يتحول لعمود واحد */
    .projects-grid,
    .web-projects-grid,
    .social-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .contact-form {
        padding: 20px;
    }
    .header-container {
        padding: 0px 10%;
    }
}
