/* ===== Root Variables ===== */
:root {
  --bg-color: #0B1120;
  --card-bg: #111827;
  --text-color: #E5E7EB;
  --muted-text: #9CA3AF;
  --primary-color: #38BDF8;
  --accent-color: #38bdf8;
  --border-color: #1F2933;
  --card-shadow: 0 10px 30px rgba(0,0,0,0.25);
  --hamburger-color: #ffffff;
  --background-img: linear-gradient(249deg, #283c92, #0b1220);
  --footer-bg: #020617;
  --footer-text: #e5e7eb;
}

*::selection {
    color: #080808;
    background-color: #2563eb;
}

html {
  scroll-behavior: smooth;
}

/* Light Mode */
body.light {
  --bg-color: #f2f1f0;
  --card-bg: #F3F4F6;
  --text-color: #111827;
  --muted-text: #4B5563;
  --primary-color: #2563EB;
  --accent-color: #2563eb;
  --border-color: #E5E7EB;
  --hamburger-color: #0f172a;
  --background-img: linear-gradient(249deg, #38BDEA, #ffffff);
  --footer-bg: #2563EB; /* يظل أسود */
  --footer-text: #E5E7EB;
}

/* ===== Global Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* ===== Links ===== */
a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  opacity: 0.85;
}

/* ===== Header ===== */
.header {
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  max-width: 1100px;
  margin: auto;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* الحاوية الخاصة بالصورة + الاسم */
.brand {
  display: flex;
  align-items: center;
  gap: 10px; /* هنا التحكم بالمسافة */
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-link:hover {
  opacity: 0.9;
}
/* الصورة */
.img_pro {
  width: 40px;
  height: 40px;
  object-fit: contain;
  cursor: pointer;
  border-radius: 50%;
}

/* الاسم */
.logo {
  font-size: 18px;
  font-weight: 600;
  margin: 0; /* مهم */
  white-space: nowrap;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-color);
  font-weight: 500;
}

/* Language Switch */
.lang-switch button {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  border-radius: 6px;
}

.lang-switch button:hover {
  background-color: var(--card-bg);
}

/* ===== Hero Section ===== */

.hero{
padding: 40px 5%;
min-height:80vh;
display:flex;
align-items:center;
}

.hero-container{

display:grid;
grid-template-columns:1.2fr 1fr;
align-items:center;
gap: 24px

}

/* النص */

.hero-title{
font-size:55px;
font-weight:700;
margin:15px 0;
}

.name{
color:#4f46e5;
}

.hero-description{
max-width:550px;
line-height:1.8;
opacity:.85;
}

/* badge */

.hero-badge{

display:inline-block;
background:rgb(147 140 175 / 8%);
padding:8px 18px;
border-radius:30px;
font-size: 20px;
margin: 17px

}

/* buttons */

.hero-buttons{

display:flex;
gap:15px;
margin-top:25px;

}

.btn{

padding:12px 26px;
border-radius:12px;
text-decoration:none;
font-weight:600;

}

.primary{

background:#4f46e5;
color:white;

}

.secondary{

border:2px solid #4f46e5;
color:#4f46e5;

}

/* social */

.hero-social{

display:flex;
gap:20px;
margin-top:25px;
font-size:22px;
margin-top: 0px;
}

/* الصورة */

.hero-image{

position:relative;
display:flex;
justify-content:center;

}

.hero-image img{

width:320px;
height:320px;
border-radius:50%;
object-fit:cover;
position:relative;
z-index:2;

}

/* glow */

.image-glow{

position:absolute;
width:360px;
height:360px;
border-radius:50%;
background:radial-gradient(circle,#4f46e5,transparent);
filter:blur(70px);
opacity:.4;

}

@media (max-width:900px){

.hero-container{

grid-template-columns:1fr;
text-align:center;

}

.hero-image{

order:-1;

}

.hero-title{

font-size:40px;

}

.hero-buttons{

justify-content:center;

}

.hero-social{

justify-content:center;

}

.hero-image img{

width:220px;
height:220px;

}

}


@media (max-width:900px){

.hero-container{

grid-template-columns:1fr;
text-align:center;

}

/* ترتيب العناصر */

.hero-text{
order:1;
}

.hero-social{
order:2;
justify-content:center;
margin-top:25px;
}

.hero-image{
order:3;
margin-top:20px;
}
.hero-title{
font-size:40px;
}

.hero-buttons{
justify-content:center;
}

.hero-image img{
width:220px;
height:220px;
}

}

/*//////////////////////OLD/////////////////////*/



.hero-buttons {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  /* justify-content: center; */
  
}
/* ===== Buttons ===== */
.btn {
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  /* transition: 0.3s; */
  transition: all 0.25s ease;
}

.btn.primary {
  background: var(--primary-color);
  color: #fff;
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3); 
}

.btn.secondary {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn.secondary:hover {
  background-color: var(--primary-color);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3);
}
/* ===== Sections ===== */
.section {
  max-width: 1076px;
  margin: auto;
  padding: 3rem 1rem;
}

.section h3 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}


/* === About Me ===*/
.about-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  margin-top: 50px;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 20px;
  width: 100%;
}

.about-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: transform .3s ease;
}

.about-card:hover {
  transform: translateY(-6px);
}

.about-card .icon {
  font-size: 18px;
  margin-bottom: 15px;
}

.about-card .icon i {
  font-size: 25px;
  color: #3b82f6;
  margin-bottom: 12px;
}

.about-card h4 {
  font-size: 16px;
  margin-bottom: 6px;
}

.about-card p {
  font-size: 14px;
  opacity: .8;
}

.about-text {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 50px;
  box-shadow: var(--card-shadow);
  font-size: 15px;
  line-height: 1.9;
  opacity: .9;
}

/* Responsive */
@media (max-width: 992px) {
  .about-container {
    grid-template-columns: 1fr;
  }
  /* الكرت تحت بعض  */
  .about-cards {
    grid-template-columns: 1fr;
  }

  

}
/* ===== Experience Timeline =====*/
.experience {
  position: relative;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
}

/* Timeline line */
.timeline {
  position: relative;
  max-width: 900px;
  margin: auto;
  padding-left: 40px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

/* Timeline item */
.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}

/* Dot */
.timeline-dot {
  position: absolute;
   left: -21px;
  top: 64px;
  width: 16px;
  height: 16px;
  background: var(--bg-color);
  border: 3px solid var(--primary-color);
  border-radius: 50%;
  z-index: 2;
}

/* Card */
.timeline-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.5rem 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

.project {
  font-size: 20px;
  margin-bottom: 1.5rem;
}

/* Text */
.timeline-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
} 

.timeline-card .company {
  color: var(--muted-text);
  font-size: 0.95rem;
}

.timeline-card .date {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--primary-color);
}
/* Responsive */
@media (max-width: 768px) {
  .timeline {
    padding-left: 30px;
  }

  .timeline-card {
    padding: 1.2rem;
  }
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.skills-grid div {
  background-color: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.skills-grid h4 {
  margin-bottom: 0.8rem;
  color: var(--primary-color);
}

.skills-grid ul {
  list-style: none;
}

.skills-grid li {
  margin-bottom: 0.4rem;
  color: var(--muted-text);
}
/* ===== Projects ===== */
.project-content {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  transition: transform .3s ease, box-shadow .3s ease;

  max-width: 900px;
  margin: auto;

  flex-grow: 1;
  gap: 10px;
}

.project-content:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.project-btn {
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--primary-color), #0ea5e9);
  color: white;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all .3s ease;
  width: 100%;

  opacity: 0.9;
}

.project-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(14,165,233,0.4);
}

.project-btn:active {
  transform: scale(0.97);
}

.project-card:hover .project-btn {
  opacity: 1;
}

.project-content h4 {
  margin-bottom: 0.5rem;
}

.project-content span {
  font-size: 0.85rem;
  color: var(--primary-color);
}

/* ===== Skills & Projects ===== */
.skills-grid div,
.project-content {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.skills-grid div:hover,
.project-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

 .contact-container {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  margin-top: 50px;
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-card {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 22px 25px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--card-shadow);
  transition: transform .3s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
}

.contact-card .icon {
  font-size: 22px;
}

.contact-card h4 {
  font-size: 15px;
  margin-bottom: 4px;
}

.contact-card p {
  font-size: 14px;
  opacity: .8;
}

/* Profile Card */
.contact-profile {
  background: var(--card-bg);
  border-radius: 22px;
  padding: 35px;
  box-shadow: var(--card-shadow);
  text-align: left;
}

.contact-profile img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
}

.contact-profile h4 {
  margin-bottom: 8px;
}

.contact-profile p {
  font-size: 14px;
  line-height: 1.8;
  opacity: .85;
  margin-bottom: 15px;
}

.profile-meta span {
  display: block;
  font-size: 13px;
  opacity: .7;
}

/* Responsive */
@media (max-width: 992px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
}

 .footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 60px 80px 30px;
  
}

.footer-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  align-items: center;
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-name {
  font-size: 20px;
  margin-bottom: 15px;
  color: #fff;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
  transition: 0.3s;

  font-size: 16px;
}

.footer-social a:hover {
  background: #3b82f6;
}

.footer-links {
  list-style: none;
  display: flex;
  gap: 20px;
  padding: 0;
  margin: 0;
  margin-right: 80px;
}

.footer a,
.footer i {
  color: var(--footer-text);
}

.footer a:hover {
  color: var(--accent-color);
}

.footer-links a {
  text-decoration: none;
  color: #cbd5e1;
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--primary-color);
}

[dir="rtl"] .footer-right {
  padding-right: 0;
  padding-left: 40px;
}

.footer-right i {
  margin-right: 8px;
  opacity: 0.8;
}

.footer-bottom {
  text-align: center;
  margin-top: 25px;
  font-size: 13px;
  opacity: 0.6;
}

.footer-social a:hover i {
  transform: scale(1.1);
}

body.rtl .footer-info i {
  margin-right: 0;
  margin-left: 8px;
}

/* Responsive */
@media (max-width: 900px) {
  .footer {
    padding: 40px 20px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-social a {
    margin: 0 6px;
  }

  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero-title {
    font-size: 1.8rem;
  }
}

/* ===== RTL Support ===== */
body.rtl {
  direction: rtl;
  text-align: right;
  /* right: auto;
  left: 20px; */
}

body.rtl .navbar {
  flex-direction: row-reverse;
}

body.rtl .nav-links {
  flex-direction: row-reverse;
}

/* ===== Theme Toggle Button ===== */
.theme-toggle button {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  border-radius: 6px;
  margin-left: 0.5rem;
}

.theme-toggle button:hover {
  background-color: var(--card-bg);
}

/* ===== Fade + Slide ===== */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.fade-up.show {
  opacity: 1;
  transform: translateY(0);
}

.nav-links a.active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 4px;
}

/********************************************************/
body.rtl .about-text {
  text-align: right;
}

body.rtl .about-cards {
  direction: rtl;
}

/************************************/

/* ===== RTL Timeline ===== */
body.rtl .timeline {
  padding-left: 0;
  padding-right: 40px;
}

body.rtl .timeline::before {
  left: auto;
  right: 12px;
}

body.rtl .timeline-dot {
  left: auto;
  right: 3px;
}

body.rtl .timeline-card {
  text-align: right;
}

body.rtl .contact-profile {
  text-align: right;
}

body.rtl .contact-card {
  flex-direction: row-reverse;
  text-align: right;
}
/***********************************/
    /* <!-- Hamburger --> */
    /* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: #fff;
  border-radius: 3px;
  background-color: var(--hamburger-color);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: absolute;
  top: 70px;
  right: 20px;
  background: #0f172a;
  border-radius: 12px;
  padding: 15px 25px;
  list-style: none;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);

  /* right: auto;
  left: 20px; */
}

.mobile-nav li {
  margin: 12px 0;
}

.mobile-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
}

/* Show on mobile */
@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  .mobile-nav.active {
    display: block;
  }
}

/*********************************/
/* // <!-- Hamburger --> */
.menu-toggle span {
  transition: 0.4s ease;
}

/* عند الفتح */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/************************************************/

#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  transition: 0.3s;
  z-index: 999;

}

#scrollTopBtn:hover {
  transform: translateY(-4px);
}

/* RTL */
body.rtl #scrollTopBtn {
  right: auto;
  left: 30px;
}


.project-details {
  max-width: 900px;
  margin: auto;
  padding: 60px 20px;
}

.project-image {
  width: 100%;
  border-radius: 18px;
  margin: 30px 0;
}

.project-details h3 {
  margin-top: 30px;
}

.project-details ul {
  padding-left: 20px;
}

.project-details li {
  margin-bottom: 8px;
}

.back-btn {
  display: inline-block;
  margin-bottom: 20px;
  text-decoration: none;
  color: #3b82f6;
  font-size: 14px;
}

/* RTL */
body.rtl {
  direction: rtl;
}

body.rtl .project-details ul {
  padding-left: 0;
  padding-right: 20px;
}

/***********************************************/

.project-details ul {
  margin-top: 10px;
}

.project-details li {
  margin-bottom: 8px;
  line-height: 1.7;
}

     /*******************************************************/
/***************************Dalyl AlSocar****************************/
     /*******************************************************/

.project-hero {
  text-align: center;
  padding: 120px 20px 80px;
}

.project-hero h1 {
  font-size: 48px;
  font-weight: bold;
}

.project-hero p {
  opacity: 0.8;
  margin: 12px 0 30px;
}

.project-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}


.btn.primary {
  background: var(--primary-color);
  color: #fff;
}

.btn.outline {
  border: 1px solid var(--border-color);
}

.project-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
  color: white;
}

.tab {
  padding: 10px 18px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border-color);
  cursor: pointer;
  /* color: var(--primary-color); */
  color: var(--primary-color);
}

.tab.active {
  background: var(--primary-color);
  color: #000;
  
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tech-tags span {
  display: inline-block;
  margin: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
}

/****************************************************/
/*************************project page***************************/
/****************************************************/

.project-hero {
  text-align: center;
  padding: 120px 20px 80px;
}

.project-hero h1 {
  font-size: 48px;
  font-weight: bold;
}

.project-hero p {
  opacity: 0.8;
  margin: 12px 0 30px;
}

.project-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.tab {
  padding: 10px 18px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tech-tags span {
  display: inline-block;
  margin: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
}

/*******************************************************/
/*******************************************************/
/*******************************************************/

.project-card {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 24px;
  background: var(--background-img);
  /* background: linear-gradient(249deg, #38BDEA, #ffffff); */
  border-radius: 18px;
  padding: 10px;
  align-items: center;
}

.project-image {
  width: 100%;
  height: 220px;
  border-radius: 14px;
  overflow: hidden;
  background: #020617;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}


.project-content span {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  color: #38bdf8;
}

@media (max-width: 900px) {
  .project-card {
    grid-template-columns: 1fr;
  }

  .project-image {
    height: 200px;
  }
}
