/* Base Theme */
:root {
  --bg: #0C0F14;
  --surface: #111418;
  --text: #e6e8eb;
  --muted: #a3adb8;
  --primary: #6aa2ff;
  --primary-600: #4a8bff;
  --accent: #22d3ee;
  --ring: rgba(106, 162, 255, 0.35);
}

/* Light Mode */
.light {
  --bg: #fcfcfd;
  --surface: #ffffff;
  --text: #0b0d10;
  --muted: #4b5563;
  --primary: #1d4ed8;
  --primary-600: #1e40af;
  --accent: #06b6d4;
  --ring: rgba(29, 78, 216, 0.25);
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  backdrop-filter: saturate(1.2) blur(6px);
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
}

.logo {
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 18px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-toggle {
  display: none;
  padding: 8px 12px;
  font-size: 20px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
  color: var(--text);
  cursor: pointer;
  line-height: 1;
}
.nav-menu {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  padding: 8px 10px;
  border-radius: 8px;
}
.nav-menu a:hover {
  background: var(--surface);
}

.theme-toggle {
  margin-left: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
  cursor: pointer;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 64px 20px;
  background: linear-gradient(
    180deg,
    color-mix(in oklab, var(--surface) 90%, transparent),
    var(--surface)
  );
  border: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
}
.hero-inner {
  max-width: 900px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  margin: 0 0 10px;
}
.highlight {
  color: var(--primary);
}
.subtitle {
  color: var(--muted);
  margin: 0 0 20px;
  font-size: clamp(14px, 2vw, 18px);
}
.hero-cta {
  display: flex;
  gap: 12px;
}
.hero-accent {
  position: absolute;
  inset: auto -20% -40% -20%;
  height: 240px;
  background: radial-gradient(
    60% 60% at 50% 0%,
    color-mix(in oklab, var(--accent) 25%, transparent),
    transparent 70%
  );
  pointer-events: none;
}

.section {
  padding: 48px 0;
}
.section h2 {
  font-size: 24px;
  margin: 0 0 20px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.card {
  grid-column: span 12;
  padding: 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card .thumb {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  background: color-mix(in oklab, var(--surface) 85%, transparent);
  border: 1px solid color-mix(in oklab, var(--text) 10%, transparent);
}
.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.card p {
  margin: 0 0 12px;
  color: var(--muted);
}
.badges {
  display: flex;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  flex-wrap: wrap;
}
.badges li {
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--surface) 70%, var(--bg));
  border: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
  color: var(--muted);
}
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px color-mix(in oklab, var(--text) 14%, transparent);
  border-color: color-mix(in oklab, var(--primary) 30%, transparent);
}
.card-actions {
  display: flex;
  gap: 8px;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.skills-list li {
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
}

.contact-info {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.contact-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px color-mix(in oklab, var(--text) 10%, transparent);
  border-color: color-mix(in oklab, var(--primary) 30%, transparent);
}

.contact-icon {
  font-size: 32px;
  line-height: 1;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.contact-link {
  color: var(--primary);
  font-size: 16px;
  transition: color 0.2s ease;
}

.contact-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.contact-form {
  display: grid;
  gap: 12px;
}
.contact-form .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.contact-form label {
  display: grid;
  gap: 6px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid color-mix(in oklab, var(--text) 15%, transparent);
  outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
  box-shadow: 0 0 0 4px var(--ring);
  border-color: var(--primary);
}
.form-status {
  min-height: 20px;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.btn.primary {
  background: var(--primary);
  border-color: var(--primary-600);
  color: white;
}
.btn.small {
  padding: 8px 10px;
  font-size: 14px;
}
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn:hover {
  transform: translateY(-1px);
}

.site-footer {
  text-align: center;
  color: var(--muted);
  padding: 28px 20px;
  border-top: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
}

@media (min-width: 700px) {
  .projects-grid .card {
    grid-column: span 6;
  }
  .contact-form .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-info {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (min-width: 1000px) {
  .projects-grid .card {
    grid-column: span 4;
  }
}

@media (max-width: 800px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .nav-menu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 60px;
    flex-direction: column;
    background: var(--surface);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
    display: none;
    min-width: 180px;
  }
  .nav-menu.open {
    display: flex;
  }
}








//
/* عام */
* {
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* بس تمنع التمرير أفقي */
}

/* الخلفية */
.background1 {
  position: fixed; /* أو absolute */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -5;
  overflow: hidden;
}

.lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  margin: auto;
  width: 90vw;
  display: flex;
  justify-content: space-between;
}

.line {
  position: relative;
  width: 1px;
  height: 100%;
  overflow: hidden;
}

.line::after {
  content: '';
  display: block;
  position: absolute;
  height: 15vh;
  width: 100%;
  top: -50%;
  left: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #ffffff 75%, #ffffff 100%);
  animation: drop 7s infinite;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(0.4, 0.26, 0, 0.97);
}

.line:nth-child(1)::after { background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #4a8bff 75%, #4a8bff 100%); animation-delay: 0.5s; }
.line:nth-child(2)::after { background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #4a8bff 75%, #4a8bff 100%); animation-delay: 1s; }
.line:nth-child(3)::after { background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #4a8bff 75%, #4a8bff 100%); animation-delay: 1.5s; }
.line:nth-child(4)::after { background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #4a8bff 75%, #4a8bff 100%); animation-delay: 2s; }
.line:nth-child(5)::after { background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #4a8bff 75%, #4a8bff 100%); animation-delay: 2.5s; }
.line:nth-child(6)::after { background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #4a8bff 75%, #4a8bff 100%); animation-delay: 3s; }
.line:nth-child(7)::after { background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #4a8bff 75%, #4a8bff 100%); animation-delay: 3.5s; }
.line:nth-child(8)::after { background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #4a8bff 75%, #4a8bff 100%); animation-delay: 4s; }
.line:nth-child(9)::after { background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #4a8bff 75%, #4a8bff 100%); animation-delay: 4.5s; }
.line:nth-child(10)::after { background: linear-gradient(to bottom, rgba(255,255,255,0) 0%,#4a8bff 75%, #4a8bff 100%); animation-delay: 5s; }

/* التحريك */
@keyframes drop {
  0% { top: -50%; }
  100% { top: 110%; }
}

/* المحتوى الرئيسي */
.main {
  position: relative;
  z-index: 99;
}