/* Layout: web.blade.php — main site styles */

:root {
  --bg: #0a0a0f;
  --surface: #111118;
  --border: #1e1e2e;
  --accent: #00ff9d;
  --accent2: #7c3aed;
  --text: #e2e8f0;
  --muted: #64748b;
  --font-display: 'Cairo', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  overflow-x: hidden;
}

/* ── NOISE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
  opacity: 0.4;
}

/* ── CURSOR GLOW ── */
.cursor-glow {
  position: fixed;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,255,157,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: left 0.4s ease, top 0.4s ease;
  z-index: 0;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; width: 100%;
  padding: 1.2rem 3rem;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.nav-logo span { color: var(--muted); }

nav ul {
  list-style: none;
  display: flex; gap: 2.5rem;
}

nav ul a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
  position: relative;
}

nav ul a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}
html[dir="rtl"] nav ul a::after { right: 0; left: auto; }
html[dir="ltr"] nav ul a::after { left: 0; right: auto; }

nav ul a:hover { color: var(--accent); }
nav ul a:hover::after { width: 100%; }

.lang-switcher a::after { display: none; }
.lang-switcher .active { color: var(--accent); font-weight: 600; }
.lang-sep { color: var(--muted); margin: 0 0.3rem; font-size: 0.8rem; }

/* Nav hamburger (hidden on desktop) */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 6px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: all 0.2s;
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 7rem 3rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(30,30,46,0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,30,46,0.4) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}

.hero-content {
  position: relative; z-index: 1;
  max-width: 1000px;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.8rem;
}

.hero-tag::before {
  content: '';
  width: 30px; height: 1px;
  background: var(--accent);
}

h1 {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 900;
  line-height: 1.0;
  margin-bottom: 1.5rem;
}

h1 .name { color: var(--text); }
h1 .highlight {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
  display: block;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: flex; gap: 1rem; flex-wrap: wrap;
}

.btn {
  padding: 0.85rem 2rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border: none;
}
.btn-primary:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,255,157,0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-stats {
  margin-top: 20px;
  bottom: 4rem;
  display: flex; gap: 3rem;
}
html[dir="rtl"] .hero-stats { right: 3rem; left: auto; }
html[dir="ltr"] .hero-stats { left: 3rem; right: auto; }

.stat {
  text-align: center;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── SECTIONS ── */
section { padding: 6rem 3rem; }

.section-header {
  display: flex; align-items: center; gap: 1.5rem;
  margin-bottom: 4rem;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

h2 {
  font-size: 2.2rem;
  font-weight: 900;
}

.section-line {
  flex: 1; height: 1px;
  background: var(--border);
}

/* ── SKILLS ── */
#skills { background: var(--surface); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.8rem;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 60px; height: 60px;
  background: radial-gradient(circle at top right, rgba(0,255,157,0.15), transparent 70%);
  transition: opacity 0.3s;
  opacity: 0;
}

.skill-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.skill-card:hover::before { opacity: 1; }

.skill-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.skill-title {
  font-weight: 700;
  margin-bottom: 0.8rem;
  font-size: 1.05rem;
}

.skill-tags {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  background: rgba(0,255,157,0.1);
  color: var(--accent);
  border: 1px solid rgba(0,255,157,0.2);
}

/* ── PROJECTS ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.project-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.project-card-link {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.project-card .project-img,
.project-card .project-info {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.project-card .project-links {
  position: relative;
  pointer-events: auto;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px var(--accent);
}

.project-img {
  height: 180px;
  position: relative;
  overflow: hidden;
}

.project-img-bg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
  transition: transform 0.4s;
}

.project-card:hover .project-img-bg { transform: scale(1.05); }

.p1 { background: linear-gradient(135deg, #0f0c29, #302b63, #24243e); }
.p2 { background: linear-gradient(135deg, #0a3d62, #1e3799); }
.p3 { background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); }
.p4 { background: linear-gradient(135deg, #2d1b69, #11998e); }
.p5 { background: linear-gradient(135deg, #360033, #0b8793); }
.p6 { background: linear-gradient(135deg, #141414, #3d5a3e); }

.project-info { padding: 1.5rem; }

.project-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.project-info p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.project-links {
  display: flex; gap: 1rem; align-items: center; justify-content: center;
  padding-top: 1.2rem;
}

.project-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  display: flex; align-items: center; gap: 0.4rem;
  transition: opacity 0.2s;
}

.project-link:hover { opacity: 0.7; }

.project-tech {
  display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.8rem;
}

/* ── EXPERIENCE ── */
#experience { background: var(--surface); }

.timeline {
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
}

.timeline-dot {
  position: absolute;
  top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

html[dir="rtl"] .timeline { padding-right: 2rem; }
html[dir="rtl"] .timeline::before { right: 0; left: auto; }
html[dir="rtl"] .timeline-item { padding-right: 3rem; padding-left: 0; }
html[dir="rtl"] .timeline-dot { right: -5px; left: auto; }
html[dir="ltr"] .timeline { padding-left: 2rem; }
html[dir="ltr"] .timeline::before { left: 0; right: auto; }
html[dir="ltr"] .timeline-item { padding-left: 3rem; padding-right: 0; }
html[dir="ltr"] .timeline-dot { left: -5px; right: auto; }

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.8;
}

/* ── CONTACT ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.social-links {
  display: flex; flex-direction: column; gap: 1rem;
}

.social-link {
  display: flex; align-items: center; gap: 1rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}
html[dir="rtl"] .social-link:hover { transform: translateX(-4px); }
html[dir="ltr"] .social-link:hover { transform: translateX(4px); }

.social-icon { font-size: 1.2rem; }

.contact-form {
  display: flex; flex-direction: column; gap: 1.2rem;
}

.form-group {
  display: flex; flex-direction: column; gap: 0.5rem;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.form-group input,
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group textarea { direction: rtl; }
html[dir="ltr"] .form-group input,
html[dir="ltr"] .form-group textarea { direction: ltr; }

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group textarea { resize: vertical; min-height: 120px; }

/* ── FOOTER ── */
footer {
  padding: 2rem 3rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}

footer p {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

footer span { color: var(--accent); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.hero-content > * {
  opacity: 0;
  animation: fadeUp 0.7s ease forwards;
}

.hero-tag { animation-delay: 0.1s; }
h1 { animation-delay: 0.25s; }
.hero-desc { animation-delay: 0.4s; }
.hero-cta { animation-delay: 0.55s; }

.cursor {
  display: inline-block;
  width: 3px; height: 1em;
  background: var(--accent);
  margin-right: 4px;
  vertical-align: middle;
  animation: blink 1s infinite;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-toggle { display: flex; }
  nav .nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(10,10,15,0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  }
  nav .nav-menu.open {
    max-height: 400px;
    opacity: 1;
  }
  nav .nav-menu li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }
  nav .nav-menu li:last-child { border-bottom: none; }
  nav .nav-menu .lang-switcher { padding: 0.75rem 0; }
  nav .nav-menu .lang-sep { margin: 0 0.5rem; }
  section { padding: 4rem 1.5rem; }
  #hero { padding: 9rem 1.5rem 4rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  html[dir="rtl"] .hero-stats { right: 1.5rem; left: auto; }
  html[dir="ltr"] .hero-stats { left: 1.5rem; right: auto; }
  .hero-stats { gap: 2rem; }
  footer { flex-direction: column; gap: 0.5rem; text-align: center; }
}
